aboutsummaryrefslogtreecommitdiff
path: root/helpers/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/__init__.py')
-rw-r--r--helpers/__init__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/helpers/__init__.py b/helpers/__init__.py
index 0f819e7..f3e5967 100644
--- a/helpers/__init__.py
+++ b/helpers/__init__.py
@@ -9,6 +9,19 @@ def path():
9 path = os.path.dirname(os.path.realpath(__file__)) 9 path = os.path.dirname(os.path.realpath(__file__))
10 return path + "/../" 10 return path + "/../"
11 11
12def parse_args():
13 for arg in sys.argv:
14 if arg == "-v":
15 sys.argv.remove(arg)
16
17 if getattr(sys, 'frozen', False):
18 f = open(path() + ".pyinstaller_commit", "r")
19 print(f.read(), end="")
20 f.close()
21 else:
22 print("option '-v' can only be used in bundled package")
23 sys.exit()
24
12def duration_to_min_sec(duration): 25def duration_to_min_sec(duration):
13 minutes = int(duration / 60) 26 minutes = int(duration / 60)
14 seconds = int(duration) % 60 27 seconds = int(duration) % 60