1.4.10.1 Starting the Prompt

To see a list of all the available options for starting an Interactive Prompt session, load a command prompt and type the following at the command line:

> python sql.py -h

This will display all the options available to you for using the interactive prompt. For example to connect to an SQLite database named test.db you might use the following command:

> python sql.py -a sqlite -d test.db

This will run the interactive prompt. You should see something similar to this:

SQLite Interactive Prompt
Type SQL or "exit" to quit, "help", "copyright" or "license" for information.
sql>

It looks a bit like the Python prompt only allows SQL queries to be entered.

When you connect to a database using the SnakeSQL or SQLite adapters the database specified is automatically created if it doesn't already exist.

Options which are specific to the underlying database and which are not handled through any of the options listed by using sql.py -h can be entered using the --more switch and specifying a string containing a Python dictionary. For example:

> python sql.py -a sqlite -d test.db --more "{'customOption1':5, 'customOption2': 'value'}"