def uri_parse(uri): module_name = uri.split(':', 1)
.....
My 2 cents: for parsing the URI I like semi-colons ';' as separators, it is a little ODBC like but it has less collisions than colons do.
This particular colon is for indicating the database type, like mysql:..., or pgsql:... -- it's what makes something a URI (instead of a DSN... though I'm even sure what DSN stands for). After that it's potentially entirely up to the database driver, though of course some uniformity is nice. Typical DSNs, from what I can tell, are parsed in an up-front manner into a set of keys and values; though maybe they sometimes include a prefix indicating database type...? Java has database URIs too, don't they? But they are all like jdbc:..., correct? Of course, following that pattern you could get dbapi:jdbc:postgresql://... which feels awfully weird to me.
-- Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org _______________________________________________ DB-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/db-sig
