[SQLObject] Re: MySQLConnection is deprecated
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Derrick H. <dma...@dm...> - 2004-11-17 18:36:46
|
On Mon, Nov 15, 2004 at 10:45:08AM -0600, Ian Bicking wrote: | Brian Beck wrote: | >On Win32 for SQLite, I can only use sqlite:/file.db or sqlite:///file.db= ,=20 | >AND | >this creates the file in the ROOT directory of whatever drive the script= is | >running from, NOT the path of the script! This is highly undesirable. |=20 | Hmm... unfortunately I can't think of any way of indicating the current= =20 | directory in a fully qualified URI. Does anyone have ideas?=20 | sqlite:/:pwd:/file.db ? Solution #1: Use the cygwin python.exe and write the URI as sqlite:/cygdrive/m/path/to/whatever/file.db Solution #2: Devise a way to embed the drive letter in the URI. As a first approach I would look for any documentation or examples that show how msvcrt.dll's fopen() parses out drive letters, then document using that same notation. (this is the same way forward slashes are handled -- Tim Peters once revealed on c.l.py that Windows' fopen() accepts forward slashes even though command.com and cmd.exe don't) Presumably in an application you will ask the user where the database should be stored instead of assuming it will reside in the application's own directory. HTH, -D --=20 Microsoft is to operating systems & security .... .... what McDonald's is to gourmet cook= ing =20 www: http://dman13.dyndns.org/~dman/ jabber: dman@dman13.dyndns.= org |