Skip to content

Commit 7fd3f05

Browse files
committed
Updated documenation for engines.rst
Clarified connecting to absolute path for sqlite using Windows.
1 parent f98c89d commit 7fd3f05

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doc/build/core/engines.rst

+6-1
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,14 @@ For a relative file path, this requires three slashes::
151151
# where <path> is relative:
152152
engine = create_engine('sqlite:///foo.db')
153153

154-
And for an absolute file path, *four* slashes are used::
154+
And for an absolute file path, the three slashes are followed by the absolute path::
155155

156+
#Unix/Mac - 4 initial slashes in total
156157
engine = create_engine('sqlite:////absolute/path/to/foo.db')
158+
#Windows
159+
engine = create_engine('sqlite:///C:\\path\\to\\foo.db')
160+
#Windows alternative using raw string
161+
engine = create_engine(r'sqlite:///C:\path\to\foo.db')
157162

158163
To use a SQLite ``:memory:`` database, specify an empty URL::
159164

0 commit comments

Comments
 (0)