-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.py
executable file
·57 lines (50 loc) · 1.37 KB
/
start.py
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Starts the TrashBin program.
"""
import argparse
import sys
MASTER_FILENAME = "~/.trashbin-master.json"
parser = argparse.ArgumentParser(
description=__doc__,
)
parser.add_argument(
'-e',
type=str,
help="Running environment -- headless CLI-arg-only, or spawn GUI",
default="gui",
dest='opermode',
choices=['gui', 'headless'],
required=False
)
parser.add_argument(
'-m',
type=str,
help="Specify filepath for the master configuration location",
default=MASTER_FILENAME,
dest='mastercfg',
required=False
)
parser.add_argument(
'-c', '--config',
type=str,
help="Specify filepath for additional config files",
action='append',
metavar='extraconfigs',
dest='extraconfigs',
default=[]
)
if __name__ == '__main__':
args = parser.parse_args()
# we have to import this and optionally override the tkinter module before
# importing anything else
from src.tkstubs import tb_override_tkinter
tb_override_tkinter(args.opermode)
import src.processor.main as mainproc
mainexec = mainproc.MainExecutor(args.mastercfg,
opermode=args.opermode,
extraconfigs=args.extraconfigs,
)
import code
code.interact(local=locals())