##// END OF EJS Templates
imanay -
r233:234
parent child
Show More
@@ -45,7 +45,7
45 answer = self.__ConnectionWithCentralControl(cmd = "SNDF", data = data)
45 answer = self.__ConnectionWithCentralControl(cmd = "SNDF", data = data)
46 return answer
46 return answer
47
47
48 def readFile(self, filename):
48 def readFile(self):
49
49
50 data = "optional"
50 data = "optional"
51 file = self.__ConnectionWithCentralControl(cmd = "GETF", data = data)
51 file = self.__ConnectionWithCentralControl(cmd = "GETF", data = data)
@@ -238,7 +238,9
238
238
239 file = self.__ConnectionWithControlModules(rx_buffer,cmd,id)
239 file = self.__ConnectionWithControlModules(rx_buffer,cmd,id)
240 del self.rxFile[id-1]
240 del self.rxFile[id-1]
241 self.rxFile.insert(id-1, file)
241 self.rxFile.insert(id-1, file)
242
243 return self.rxFile
242
244
243 def __changeBeam(self, cmd, rx_buffer):
245 def __changeBeam(self, cmd, rx_buffer):
244
246
@@ -11,14 +11,9
11 def __init__(self):
11 def __init__(self):
12 self.output = ""
12 self.output = ""
13
13
14 def execute(self, filename):
14 def execute(self):
15 if os.path.exists(filename):
15 absObj = ABSClient(ipDestino="10.10.20.27")
16 #absObj = ABSClient(ipDestino="10.10.10.97")
16 self.output = absObj.readFile()
17 absObj = ABSClient(ipDestino="10.10.20.27")
18 self.output = absObj.readFile(filename)
19 #pass
20 else:
21 print "No file"
22
17
23 def getOutput(self):
18 def getOutput(self):
24 return self.output
19 return self.output
@@ -27,13 +22,7
27
22
28 if __name__ == '__main__':
23 if __name__ == '__main__':
29
24
30 parser = optparse.OptionParser(usage=usage)
25 app = readFile()
31
26 app.execute()
32 parser.add_option("-f", "--filename", dest="filename", type="string", default="", help="Filename")
33
27
34 (options, args) = parser.parse_args()
28 print app.output
35
36 filename = options.filename
37
38 app = readFile()
39 app.execute(filename)
General Comments 0
You need to be logged in to leave comments. Login now