-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__main__.py
More file actions
42 lines (35 loc) · 1.1 KB
/
Copy path__main__.py
File metadata and controls
42 lines (35 loc) · 1.1 KB
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
# __main__.py
import sys
def code():
"""Encode & Decode"""
def gui():
from .gui import App
App().mainloop()
def new():
from .DeltacodeNew import main as menu
from .encodings import Cesar, ROT, DayEncoding
menu(Cesar, ROT, DayEncoding, copy=True).run()
def old():
from .Deltacode import main as menu
menu().run()
if "-gui" in sys.argv:
gui()
elif "-pwd" in sys.argv:
from DeltacodeProject.gui import PasswordManager
PasswordManager().show()
elif "-new" in sys.argv:
new()
elif "-old" in sys.argv:
old()
else:
from DeltacodeProject.DeltacodeNew import main as menu
match input(menu(copy=False).create_menu(1, ["Nouveau (adaptatif + byte) ==> DeltacodeNew", "Ancien ==> Deltacode"])):
case "1":
new()
case "2":
old()
case other:
from DeltacodeProject.game.play import play
play()
if __name__ == "__main__":
code()