changeBeam.py
30 lines
| 711 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): | |||
pass | |||
def execute(self, beam="0"): | |||
absObj = ABSClient(ipDestino="10.10.10.97") | |||
absObj.changeBeam(beam) | |||
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() | |||
app.execute(beam) |