开发者_如何学CI'm running python 2.6 on windows and currently going over the django tutorial. In the book, it says that SQLite comes shipped with Python 2.5 and above. So if I'm running python 2.6, there's nothing additional I have to download? And how exactly do I access SQLite? Do I access it in its own command line or gui program or through the windows cmd? I just want to create a database so I can go along with the tutorial.
You are correct: no additional download required.
This is all you need (from Windows command prompt or "cmd"):
C:\> python
>>> import sqlite3
>>> conn = sqlite3.connect('c:/path/to/your.db')
>>> conn.close() # optional
After executing the above commands you will have an SQLite file at c:/path/to/
called your.db
.
精彩评论