-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNetworkFunction.py
More file actions
46 lines (37 loc) · 1.2 KB
/
NetworkFunction.py
File metadata and controls
46 lines (37 loc) · 1.2 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
43
44
45
46
# -*- coding: utf-8 -*-
import os
import PrintTitle
import DelPrint
import MenuLine
class NetworkFunction(object):
def __init__(self):
pass
def __del__(self):
DelPrint.DelPrint().delMainPrint()
def networkMenuTitle(self):
MenuLine.MenuLine().getNetworkFunctionMenuLine()
def setShellCommand(self,value):
if value == 1:
os.system('bash ~/code/ShellCode/macChange.sh')
print('')
def setNetworkFunction(self):
while True:
PrintTitle.PrintTitle().getNetworkTitle()
self.networkMenuTitle()
print('')
value = int(input("Please input serial number:"))
print('')
if value == 1:
self.getShellCommand(value)
DelPrint.DelPrint().delNetworkPrint()
elif value == 3:
self.getShellCommand(value)
DelPrint.DelPrint().delNetworkPrint()
elif value == 0:
break
def getShellCommand(self,value):
return self.setShellCommand(value)
def getNetworkFunction(self):
return self.setNetworkFunction()
def networkMain(self):
self.getNetworkFunction()