-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdeathnote.py
More file actions
33 lines (30 loc) · 928 Bytes
/
deathnote.py
File metadata and controls
33 lines (30 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import sys
import os
major, minor, micro, release_level, serial = sys.version_info
if major < 3 and minor < 6:
print("[!] Deathnote requires Python 3.6 or higher.")
sys.exit(1)
from base.create_config import create_config_file
if not os.path.isfile('config/config.ini'):
create_config_file()
from core.console import Interpreter
from core.storage import LocalStorage
from core.utils.module_parser import *
from core.utils.db import db, Workspace, create_db
def main():
""" Deathnote framework. """
local_storage = LocalStorage()
local_storage.set("workspace", "default")
framework = Interpreter()
framework.start()
if __name__ == "__main__":
try:
if not os.path.isfile('db/deathnote.db'):
print("Database initialisation")
create_db()
default = Workspace("default")
db.add(default)
db.commit()
main()
except (KeyboardInterrupt, SystemExit):
sys.exit(0)