##// END OF EJS Templates
imanay -
r265:266
parent child
Show More
@@ -1,35 +1,35
1 import optparse, os, sys No newline at end of file
1 import optparse, os, sys
2 No newline at end of file
2
3 pathFile = os.path.dirname(os.path.abspath(__file__)) No newline at end of file
3 pathFile = os.path.dirname(os.path.abspath(__file__))
4 sys.path.append(os.path.split(pathFile)[0]) No newline at end of file
4 sys.path.append(os.path.split(pathFile)[0])
5 No newline at end of file
5
6 from bin.client3 import ABSClient No newline at end of file
6 from bin.client3 import ABSClient
7 No newline at end of file
7
8 class changeBeam(object): No newline at end of file
8 class changeBeam(object):
9 No newline at end of file
9
10 def __init__(self): No newline at end of file
10 def __init__(self):
11 self.output = "" No newline at end of file
11 self.output = ""
12 No newline at end of file
12
13 def execute(self, beam="0"):
13 def execute(self, beam="0"):
No newline at end of file
14 absObj = ABSClient(ipDestino="10.10.10.97")
14 #absObj = ABSClient(ipDestino="10.10.10.97")
No newline at end of file
No newline at end of file
15 #absObj = ABSClient(ipDestino="10.10.20.27") No newline at end of file
15 absObj = ABSClient(ipDestino="10.10.20.27") No newline at end of file
16 self.output = absObj.changeBeam(beam) No newline at end of file
16 self.output = absObj.changeBeam(beam)
17 No newline at end of file
17
18 def getOutput(self): No newline at end of file
18 def getOutput(self):
19 return self.output No newline at end of file
19 return self.output
20 No newline at end of file
20
21 No newline at end of file
21
22 usage = "::::::::::::\n" No newline at end of file
22 usage = "::::::::::::\n"
23 No newline at end of file
23
24 if __name__ == '__main__': No newline at end of file
24 if __name__ == '__main__':
25 No newline at end of file
25
26 parser = optparse.OptionParser(usage=usage) No newline at end of file
26 parser = optparse.OptionParser(usage=usage)
27 No newline at end of file
27
28 parser.add_option("-n", "--beam", dest="pattern", type="string", default="0", help="Number of Pattern") No newline at end of file
28 parser.add_option("-n", "--beam", dest="pattern", type="string", default="0", help="Number of Pattern")
29 No newline at end of file
29
30 (options, args) = parser.parse_args() No newline at end of file
30 (options, args) = parser.parse_args()
31 No newline at end of file
31
32 beam = options.pattern No newline at end of file
32 beam = options.pattern
33 No newline at end of file
33
34 app = changeBeam() No newline at end of file
34 app = changeBeam()
35 app.execute(beam) No newline at end of file
35 app.execute(beam)
@@ -1,13 +1,16
1 import file
1 import optparse, os, sys No newline at end of file
No newline at end of file
2 from client3 import *
No newline at end of file
3 import sys No newline at end of file
4
2
No newline at end of file
3 pathFile = os.path.dirname(os.path.abspath(__file__))
5 absObj = ABSClient(ipDestino="10.10.10.99") No newline at end of file
No newline at end of file
4 sys.path.append(os.path.split(pathFile)[0])
No newline at end of file
5
No newline at end of file
6 from bin.client3 import ABSClient
No newline at end of file
7
No newline at end of file
8 absObj = ABSClient(ipDestino="10.10.10.97") No newline at end of file
6 #absObj = ABSClient(ipDestino="10.10.20.27") No newline at end of file
9 #absObj = ABSClient(ipDestino="10.10.20.27")
7 #absObj = ABSClient() No newline at end of file
10 #absObj = ABSClient()
8 if len(sys.argv) == 2: No newline at end of file
11 if len(sys.argv) == 2:
9 # ns = "4" No newline at end of file
12 # ns = "4"
10 arg = sys.argv[1] No newline at end of file
13 arg = sys.argv[1]
11 absObj.getControlModuleStatus_test(arg) No newline at end of file
14 absObj.getControlModuleStatus_test(arg)
12 else: No newline at end of file
15 else:
13 print "Only one argument needed." No newline at end of file
16 print "Only one argument needed."
@@ -1,39 +1,39
1 No newline at end of file
1
2 import optparse, os, sys No newline at end of file
2 import optparse, os, sys
3 No newline at end of file
3
4 pathFile = os.path.dirname(os.path.abspath(__file__)) No newline at end of file
4 pathFile = os.path.dirname(os.path.abspath(__file__))
5 sys.path.append(os.path.split(pathFile)[0]) No newline at end of file
5 sys.path.append(os.path.split(pathFile)[0])
6 No newline at end of file
6
7 from bin.client3 import ABSClient No newline at end of file
7 from bin.client3 import ABSClient
8 No newline at end of file
8
9 class sendFile(object): No newline at end of file
9 class sendFile(object):
10 No newline at end of file
10
11 def __init__(self): No newline at end of file
11 def __init__(self):
12 self.output = "" No newline at end of file
12 self.output = ""
13 No newline at end of file
13
14 def execute(self, filename): No newline at end of file
14 def execute(self, filename):
15 if os.path.exists(filename): No newline at end of file
15 if os.path.exists(filename):
16 #absObj = ABSClient(ipDestino="10.10.10.97")
16 #absObj = ABSClient(ipDestino="10.10.10.97")
No newline at end of file
17 absObj = ABSClient(ipDestino="10.10.10.97") No newline at end of file
17 absObj = ABSClient(ipDestino="10.10.20.27") No newline at end of file
18 self.output = absObj.sendFile(filename) No newline at end of file
18 self.output = absObj.sendFile(filename)
19 #pass No newline at end of file
19 #pass
20 else: No newline at end of file
20 else:
21 print "No file" No newline at end of file
21 print "No file"
22 No newline at end of file
22
23 def getOutput(self): No newline at end of file
23 def getOutput(self):
24 return self.output No newline at end of file
24 return self.output
25 No newline at end of file
25
26 usage = "::::::::::::\n" No newline at end of file
26 usage = "::::::::::::\n"
27 No newline at end of file
27
28 if __name__ == '__main__': No newline at end of file
28 if __name__ == '__main__':
29 No newline at end of file
29
30 parser = optparse.OptionParser(usage=usage) No newline at end of file
30 parser = optparse.OptionParser(usage=usage)
31 No newline at end of file
31
32 parser.add_option("-f", "--filename", dest="filename", type="string", default="", help="Filename") No newline at end of file
32 parser.add_option("-f", "--filename", dest="filename", type="string", default="", help="Filename")
33 No newline at end of file
33
34 (options, args) = parser.parse_args() No newline at end of file
34 (options, args) = parser.parse_args()
35 No newline at end of file
35
36 filename = options.filename No newline at end of file
36 filename = options.filename
37 No newline at end of file
37
38 app = sendFile() No newline at end of file
38 app = sendFile()
39 app.execute(filename) No newline at end of file
39 app.execute(filename)
General Comments 0
You need to be logged in to leave comments. Login now