[DB-SIG] [SQLObject] Re: SQLite connection - relative filename
Clark, Chris M
Chris.Clark at ca.com
Sat Apr 2 00:19:55 CEST 2005
> -----Original Message-----
> From: db-sig-bounces at python.org
> [mailto:db-sig-bounces at python.org] On Behalf Of Ian Bicking
> Sent: Friday, April 01, 2005 12:23 PM
> To: Paul Moore
> Cc: sqlobject-discuss at lists.sourceforge.net; Python DB-SIG
> Mailing List
> Subject: [DB-SIG] [SQLObject] Re: SQLite connection -
> relative filename
>
> Paul Moore wrote:
> > Maybe _parseURI should use urllib.url2pathname? That would still be
> > mildly suboptimal, as url2pathname doesn't accept the common form
> > '///C:/a/b/...'. But that's a stdlib issue.
>
> Incidentally, while we're on the topic of URIs, I'd like to
> move all this URI parsing stuff into a library that doesn't
> have SQLObject dependencies, so that other people can use the
> same syntax for defining DB-API connections in any system.
> Since there's all sort of annoying aspects to URI parsing
> (many of which probably would have been avoided if I had used
> urllib from the start :( ), it seems like such a library
> would be useful. Such a library would probably produce a
> connection function and keyword parameters, so that actual
> connection creation could be held off until after parsing, i.e.:
>
>
.....
> 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.
Chris
More information about the DB-SIG
mailing list