-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (23 loc) · 671 Bytes
/
main.py
File metadata and controls
31 lines (23 loc) · 671 Bytes
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
"""UDP communicator provides client-server communication with file transfer based on UDP.
School assignment n. 2 from course Computer and Communication Networks.
"""
import client
import server
import sys
__author__ = "Erik Matovic"
__version__ = "1.0.1"
__email__ = "xmatovice@stuba.sk"
__status__ = "Production"
def main():
if len(sys.argv) != 2:
print("ERROR 00: Wrong parameters!")
sys.exit(-1)
if sys.argv[1] == 'client':
client.user_interface()
elif sys.argv[1] == 'server':
server.user_interface()
else:
print("ERROR 00: Wrong parameters!")
sys.exit(-1)
if __name__ == '__main__':
main()