> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Ian Bicking
> Sent: Friday, April 01, 2005 12:23 PM
> To: Paul Moore
> Cc: [EMAIL PROTECTED]; 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
_______________________________________________
DB-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/db-sig

Reply via email to