Re: [SQLObject] URI parsing on windows w/ drive letter and colon
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Kevin D. <da...@gm...> - 2005-10-02 19:19:04
|
I just added this to the turbogears quickstart config: # for Windows users, sqlite URIs look like: # sqlobject.dburi=3D"sqlite:///drive_letter|/path/to/file" SQLObject does expect a | instead of a : in the URI for sqlite. Kevin On 10/2/05, Brad Clements <bk...@mu...> wrote: > > I am trying to use py.test to make sure my install works. > > > I've added some debug print statements to the sqllite driver to see what > kind of path it's given. > > > I'm running on Windows.. > > > dbtest.py has this: > > > installedDBFilename =3D os.path.join(getcwd(), 'dbs_data.tmp') > > > > > installedDBTracker =3D sqlobject.connectionForURI( > 'sqlite:///' + installedDBFilename) > > > > > I note that installDBFilename comes out as: > > > E|\prj\src\sqlobject\sqlobject\tests\dbs_data.tmp > > > (note vertical bar where I expect a colon) > > > > > sqlite prints out this: > > > PATH E:\prj\src\sqlobject\sqlobject\tests\dbs_data.tmp > > > Who changed the vertical bar to a colon? > > > anyway, trying this on the py.test command line: > > > py.test -D sqlite:///f:/temp/test.db test_aliases.py > > > prints: > > > PATH /f:/temp/test.db > > > so, we get a leading / > > > If I change to: > > > py.test -D sqlite://f:/temp/test.db test_aliases.py > > > I get: > > > Could not open database: port must be integer, got '\temp\test.db' instea= d > > > So my question is, what's the correct form for passing windows file paths > that include a colon in a URI? > > > > > > > > > -- > Brad Clements, bk...@mu... (315)268-1000 > http://www.murkworks.com > AOL-IM or SKYPE: BKClements > > > -- Kevin Dangoor Author of the Zesty News RSS newsreader email: ki...@bl... company: http://www.BlazingThings.com blog: http://www.BlueSkyOnMars.com |