-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkromsatel.py
executable file
·59 lines (41 loc) · 1.33 KB
/
kromsatel.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
#!/usr/bin/env python3
__version__ = '2.0.b'
# YYYY-mm-dd
__last_update_date__ = '2022-02-23'
# __author__ = 'Maxim Sikolenko'
# Check python interpreter version
import sys
if sys.version_info.major < 3:
print(
'\nYour python interpreter version is ' + '%d.%d' \
% (sys.version_info.major, sys.version_info.minor)
)
print(' Please, use Python 3.\a')
# In python 2 'raw_input' does the same thing as 'input' in python 3.
# Neither does 'input' in python2.
if sys.platform.startswith('win'):
raw_input('Press ENTER to exit:')
# end if
sys.exit(1)
# end if
from src.platform import platformwise_exit
# Firstly check if ve just need to print version or help message
if '-v' in sys.argv[1:] or '--version' in sys.argv[1:] or '-version' in sys.argv[1:]:
print(__version__)
platformwise_exit(0)
# end if
import src.print_help
if len(sys.argv) == 1 \
or '-h' in sys.argv[1:] \
or '--help' in sys.argv[1:] \
or '-help' in sys.argv[1:]:
src.print_help.print_help(__version__, __last_update_date__)
platformwise_exit(0)
# end if
import os
print('\n == {} v{} ==\n'.format(os.path.basename(__file__), __version__))
from src.main import main
if __name__ == '__main__':
result_status = main()
platformwise_exit(result_status)
# end if