changeBeam.py
35 lines
| 848 B
| text/x-python
|
PythonLexer
|
r164 | import optparse, os, sys | ||
r76 | ||||
|
r165 | pathFile = os.path.dirname(os.path.abspath(__file__)) | ||
|
r164 | sys.path.append(os.path.split(pathFile)[0]) | ||
r137 | ||||
|
r165 | from bin.client3 import ABSClient | ||
|
r164 | |||
class changeBeam(object): | ||||
def __init__(self): | ||||
r169 | self.output = "" | |||
|
r164 | |||
def execute(self, beam="0"): | ||||
r265 | absObj = ABSClient(ipDestino="10.10.10.97") | |||
#absObj = ABSClient(ipDestino="10.10.20.27") | ||||
r169 | self.output = absObj.changeBeam(beam) | |||
def getOutput(self): | ||||
return self.output | ||||
|
r164 | |||
usage = "::::::::::::\n" | ||||
if __name__ == '__main__': | ||||
parser = optparse.OptionParser(usage=usage) | ||||
parser.add_option("-n", "--beam", dest="pattern", type="string", default="0", help="Number of Pattern") | ||||
(options, args) = parser.parse_args() | ||||
beam = options.pattern | ||||
app = changeBeam() | ||||
r222 | app.execute(beam) | |||