From: Jim Hokanson Date: Sun, 14 Sep 2014 04:25:41 +0000 (-0400) Subject: Updated documenation for engines.rst X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8db30d7a2bc3a47565117be758b7f2d1b8b62863;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Updated documenation for engines.rst Clarified connecting to absolute path for sqlite using Windows. --- diff --git a/doc/build/core/engines.rst b/doc/build/core/engines.rst index fb0320474c..17ec9416c5 100644 --- a/doc/build/core/engines.rst +++ b/doc/build/core/engines.rst @@ -151,9 +151,14 @@ For a relative file path, this requires three slashes:: # where is relative: engine = create_engine('sqlite:///foo.db') -And for an absolute file path, *four* slashes are used:: +And for an absolute file path, the three slashes are followed by the absolute path:: + #Unix/Mac - 4 initial slashes in total engine = create_engine('sqlite:////absolute/path/to/foo.db') + #Windows + engine = create_engine('sqlite:///C:\\path\\to\\foo.db') + #Windows alternative using raw string + engine = create_engine(r'sqlite:///C:\path\to\foo.db') To use a SQLite ``:memory:`` database, specify an empty URL::