Skip to content

Instantly share code, notes, and snippets.

@AphonicChaos
Created July 6, 2012 18:45
Show Gist options
  • Save AphonicChaos/3061977 to your computer and use it in GitHub Desktop.
Save AphonicChaos/3061977 to your computer and use it in GitHub Desktop.
preliminary vice session
[edwin@enigma test]$ ls
[edwin@enigma test]$ python -m vice.main
vice> generate
vice> quit
[edwin@enigma test]$ ls
foo.py
[edwin@enigma test]$ cat foo.py
import os
import sys
from vice.databse import Database
from vice.plugins import Action, Container, Item
DB_FILE = {db_file}
DB_DRIVER = 'sqlite'
# DO NOT EDIT BELOW THIS LINE!
db_path = os.path.abspath(os.path.join(os.path.dirname(__file__), DB_FILE))
if DB_DRIVER == 'sqlite':
db = Database('sqlite:////' + db_path)
else:
print(DB_DRIVER + "driver not implemented, sorry!")
sys.exit(1)
[edwin@enigma test]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment