forked from kanishk-ux/Tethered-cell-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathencrypt.py
88 lines (69 loc) · 1.7 KB
/
encrypt.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
'''
File takes input from user using GUI and passes arguments taken to tcap3
'''
import sys
import func
import os
'''
Importing package Tkinter and handling errors
Tkinter is a GUI processing library which helps to create window which exists independetly on the screen
'''
try:
from Tkinter import *
except ImportError:
from tkinter import *
from tkinter.filedialog import askopenfilename
'''Importing package ttk and handing errors
ttk is a dependency of Tkinter
'''
try:
import ttk
py3 = 0
except ImportError:
import tkinter.ttk as ttk
py3 = 1
'''Defining global variable filename and outputfile'''
global filename
password = ""
mode = ""
global outputfile
variable_1 = -1
variable_2 = -1
variable_3 = -1
variable_4 = -1
def init(top, gui, *args, **kwargs):
'''
Initializing function calls the GUI handler
Input Variables: top, gui
'''
global w, top_level, root
w = gui
top_level = top
root = top
def destroy_window():
'''
Function which closes the window.
'''
global top_level
top_level.destroy()
top_level = None
def callback():
'''
Callback function used to loop back to original
'''
global filename, outputfile
filename = askopenfilename()
print (filename)
def encrypt_decrypt_dummy():
'''
Function which is used to execute command after inputs are taken from GUI
'''
frames = w.Entry1.get()
metadata = w.Entry2.get()
fps = w.Entry3.get()
delay = w.Entry4.get()
print (filename.replace(" ","@@@"))
os.system("python3" + " main.py " + filename + " " + frames + " " + metadata + " " + fps + " " + delay)
if __name__ == '__main__':
import gui_handeller
gui_handeller.vp_start_gui()