I installed python3.3 and I am learning django 1.5x.
I chose sqlite3 to learn with django and I am running python, django - and trying to run - sqlite3 in command line at windows.
All the problem is: where is the file of sqlite3 to run a command like > sqlite3 my_db
??
I tried to found at C:\Python33\Lib\sqlite3;C:\Python33\Lib
and search at windows explorer but I really can't find.
I am running my projects at C:\projects\mysite
If you are using Linux or a Mac, open a terminal window instead a command prompt. Open a command prompt (cmd.exe) and 'cd' to the folder location of the SQL_SAFI. sqlite database file. run the command 'sqlite3' This should open the SQLite shell and present a screen similar to that below.
Start the sqlite3 program by typing "sqlite3" at the command prompt, optionally followed by the name of the file that holds the SQLite database (or ZIP archive). If the named file does not exist, a new database file with the given name will be created automatically.
Assuming that you want to inspect the database created by django, and assuming that the sqlite executable is installed, you can do the following to run sqlite in the command line:
./manage.py dbshell
More information on this command can be found in the django documentation.
Python itself dosen't contain a sqlite3 command.
But the SQLite library includes a simple command-line utility named sqlite3 (or sqlite3.exe on windows) that allows the user to manually enter and execute SQL commands against an SQLite database. You can download it from here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With