+ return dict(opts)
+
+ def parse_driverstring(self, ds):
+ '''Dissect the driver string and return a tuple consisting of
+ the driver name and the options (as a dictionary).'''
+
+ m = re.match('(?P<name>[^:]+)(?P<opts>(:[^:=]+=[^:=]+)*)$', ds)
+ if not m:
+ raise ValueError('"{}" is not a valid driver string.'.format(ds))