Created
July 6, 2012 18:45
-
-
Save AphonicChaos/3061977 to your computer and use it in GitHub Desktop.
preliminary vice session
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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