tmp
This commit is contained in:
@@ -41,8 +41,14 @@ import subprocess as sprc
|
|||||||
from utilities import *
|
from utilities import *
|
||||||
import telnetlib
|
import telnetlib
|
||||||
|
|
||||||
d2r=2*np.pi/360
|
sys.path.insert(0,os.path.expanduser('~/Documents/prj/SwissFEL/PBTools/'))
|
||||||
|
#sys.path.insert(0,'/sf/bernina/config/swissmx/zamofing_t')
|
||||||
|
#sys.path.insert(0,'/sf/bernina/config/swissmx/zamofing_t/pbtools/misc/')
|
||||||
|
from pbtools.misc.pp_comm import PPComm
|
||||||
|
from pbtools.misc.gather import Gather
|
||||||
|
from MXMotion import MotionBase
|
||||||
|
|
||||||
|
d2r=2*np.pi/360
|
||||||
|
|
||||||
#ax.set_xlabel('Z');ax.set_ylabel('X');ax.set_zlabel('Y')
|
#ax.set_xlabel('Z');ax.set_ylabel('X');ax.set_zlabel('Y')
|
||||||
#plot coordinates: X Y Z
|
#plot coordinates: X Y Z
|
||||||
@@ -74,42 +80,9 @@ class Trf:
|
|||||||
m[0:3, 3] =(x,y,z)
|
m[0:3, 3] =(x,y,z)
|
||||||
return m
|
return m
|
||||||
|
|
||||||
class HelicalScan:
|
class HelicalScan(MotionBase):
|
||||||
def __init__(self,args):
|
def __init__(self,comm, gather, verbose):
|
||||||
if args.cfg:
|
MotionBase.__init__(self,comm, gather, verbose)
|
||||||
fh=open(args.cfg,'r')
|
|
||||||
s=fh.read()
|
|
||||||
cfg=json.loads(s, object_hook=ConvUtf8)
|
|
||||||
s=json.dumps(cfg, indent=2, separators=(',', ': '));print(s)
|
|
||||||
else:
|
|
||||||
fn='/tmp/shapepath4'
|
|
||||||
#fn='/home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/python/data/'+time.strftime('%y-%m-%d-%H_%M_%S')
|
|
||||||
#cfg = {"sequencer": ['gen_grid_points(w=5,h=5,pitch=100,rnd=0.4)', 'sort_points()','gen_prog(file="'+fn+'.prg",host="SAR-CPPM-EXPMX1",mode=1,pt2pt_time=10,cnt=1)', 'plot_gather("'+fn+'.npz")']}
|
|
||||||
#cfg = {"sequencer": ['test_find_rot_ctr()']}
|
|
||||||
#cfg = {"sequencer": ['test_find_rot_ctr(n=5. ,per=1.,bias=2.31,ampl=4.12,phi=24.6)']}
|
|
||||||
cfg = {"sequencer": ['test_coord_trf()']}
|
|
||||||
|
|
||||||
self.cfg=dotdict(cfg)
|
|
||||||
self.args=args
|
|
||||||
|
|
||||||
def sequencer(self):
|
|
||||||
print('args='+str(self.args))
|
|
||||||
print('cfg='+str(self.cfg))
|
|
||||||
#try:
|
|
||||||
# self.points=np.array(self.cfg.points)
|
|
||||||
#except AttributeError:
|
|
||||||
# pass
|
|
||||||
try:
|
|
||||||
sequencer= self.cfg.pop('sequencer')
|
|
||||||
except KeyError:
|
|
||||||
print('no command sequence to execute')
|
|
||||||
else:
|
|
||||||
dryrun=self.args.dryrun
|
|
||||||
for cmd in sequencer:
|
|
||||||
print('>'*5+' '+cmd+' '+'<'*5)
|
|
||||||
if not dryrun:
|
|
||||||
eval('self.' + cmd)
|
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def test_find_rot_ctr(n=3.,per=1.,bias=4.1,ampl=2.4,phi=37):
|
def test_find_rot_ctr(n=3.,per=1.,bias=4.1,ampl=2.4,phi=37):
|
||||||
@@ -146,7 +119,6 @@ class HelicalScan:
|
|||||||
plt.show()
|
plt.show()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def test_coord_trf(self):
|
def test_coord_trf(self):
|
||||||
param = self.param
|
param = self.param
|
||||||
cx, cz, w, fy, = (0.2,0.3,0.1,0.4)
|
cx, cz, w, fy, = (0.2,0.3,0.1,0.4)
|
||||||
@@ -165,16 +137,6 @@ class HelicalScan:
|
|||||||
(dx,dz,w,y) = self.fwd_transform(cx,cz,w,fy)
|
(dx,dz,w,y) = self.fwd_transform(cx,cz,w,fy)
|
||||||
print('fwd_trf: dx:%.6g dz:%.6g w:%.6g fy:%.6g' % (dx,dz,w/d2r*1000.,y))
|
print('fwd_trf: dx:%.6g dz:%.6g w:%.6g fy:%.6g' % (dx,dz,w/d2r*1000.,y))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# plt.ion()
|
|
||||||
# fig = plt.figure()
|
|
||||||
|
|
||||||
# a=anim.FuncAnimation(fig,self.my_anim_func3,100,fargs=(horig,pt),interval=20,blit=False)
|
|
||||||
# plt.show()
|
|
||||||
|
|
||||||
# def my_anim_func3(self,idx):
|
|
||||||
# self.hCrist,pt=self.pltCrist(cx=0,ty=0,cz=0,w=10*idx*d2r,h=self.hCrist)
|
|
||||||
def mpl_test(self):
|
def mpl_test(self):
|
||||||
plt.ion()
|
plt.ion()
|
||||||
fig = plt.figure()
|
fig = plt.figure()
|
||||||
@@ -253,7 +215,6 @@ class HelicalScan:
|
|||||||
fig.obj=self
|
fig.obj=self
|
||||||
fig.data=y
|
fig.data=y
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def onmove(event):
|
def onmove(event):
|
||||||
#print 'button=%s, x=%d, y=%d, xdata=%f, ydata=%f'%(
|
#print 'button=%s, x=%d, y=%d, xdata=%f, ydata=%f'%(
|
||||||
@@ -338,7 +299,6 @@ class HelicalScan:
|
|||||||
#l.set_ydata(amp * np.sin(2 * np.pi * freq * t))
|
#l.set_ydata(amp * np.sin(2 * np.pi * freq * t))
|
||||||
self.fig.canvas.draw_idle()
|
self.fig.canvas.draw_idle()
|
||||||
|
|
||||||
|
|
||||||
def interactive_dx_dz_w_y(self):
|
def interactive_dx_dz_w_y(self):
|
||||||
fig = plt.figure()
|
fig = plt.figure()
|
||||||
self.ax=ax=plt3d.Axes3D(fig,[0.02, 0.15, 0.96, 0.83])
|
self.ax=ax=plt3d.Axes3D(fig,[0.02, 0.15, 0.96, 0.83])
|
||||||
@@ -383,7 +343,6 @@ class HelicalScan:
|
|||||||
self.hCrist=hCrist;self.fig=fig
|
self.hCrist=hCrist;self.fig=fig
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
|
|
||||||
def update_dx_dz_w_y(self,val):
|
def update_dx_dz_w_y(self,val):
|
||||||
dx = self.sldDx.val
|
dx = self.sldDx.val
|
||||||
dz = self.sldDz.val
|
dz = self.sldDz.val
|
||||||
@@ -423,7 +382,6 @@ class HelicalScan:
|
|||||||
plt.show()
|
plt.show()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def update_anim(self,frm):
|
def update_anim(self,frm):
|
||||||
(cx, cz, w, fy)=self.rec[int(frm),:]
|
(cx, cz, w, fy)=self.rec[int(frm),:]
|
||||||
#data/=. #scale from um to mm
|
#data/=. #scale from um to mm
|
||||||
@@ -432,7 +390,6 @@ class HelicalScan:
|
|||||||
self.hCrist,pt=self.pltCrist(-cx,-cz,w,-fy,self.hCrist)
|
self.hCrist,pt=self.pltCrist(-cx,-cz,w,-fy,self.hCrist)
|
||||||
self.fig.canvas.draw_idle()
|
self.fig.canvas.draw_idle()
|
||||||
|
|
||||||
|
|
||||||
def anim_gather_data(self,idx):
|
def anim_gather_data(self,idx):
|
||||||
(cx, cz, w, fy)=self.rec[int(idx*self.step),:]
|
(cx, cz, w, fy)=self.rec[int(idx*self.step),:]
|
||||||
w*=d2r/1000 # scale from deg to rad
|
w*=d2r/1000 # scale from deg to rad
|
||||||
@@ -486,7 +443,6 @@ class HelicalScan:
|
|||||||
res=(dx,dz,w,y)
|
res=(dx,dz,w,y)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
def inv_transform(self,dx,dz,w,y):
|
def inv_transform(self,dx,dz,w,y):
|
||||||
#input: dx,dz,w,y
|
#input: dx,dz,w,y
|
||||||
#output: cx,cz,w,fy
|
#output: cx,cz,w,fy
|
||||||
@@ -511,7 +467,6 @@ class HelicalScan:
|
|||||||
res=(cx,cz,w,fy)
|
res=(cx,cz,w,fy)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
def calcParamSim(self):
|
def calcParamSim(self):
|
||||||
#simulated test values
|
#simulated test values
|
||||||
n = 3.;
|
n = 3.;
|
||||||
@@ -532,7 +487,6 @@ class HelicalScan:
|
|||||||
(bias, ampl, phase) = param[i][2:]
|
(bias, ampl, phase) = param[i][2:]
|
||||||
print(param)
|
print(param)
|
||||||
|
|
||||||
|
|
||||||
def calcParam(self,x=((-241.,96.,-53.),(-162.,-293.,246.)),
|
def calcParam(self,x=((-241.,96.,-53.),(-162.,-293.,246.)),
|
||||||
y=(575.,175.),
|
y=(575.,175.),
|
||||||
z=((-1401.,-1401.,-1802.),(-1802.,-1303.,-1402.))):
|
z=((-1401.,-1401.,-1802.),(-1802.,-1303.,-1402.))):
|
||||||
@@ -579,7 +533,6 @@ class HelicalScan:
|
|||||||
|
|
||||||
print(param)
|
print(param)
|
||||||
|
|
||||||
|
|
||||||
def pltOrig(self,m,h=None):
|
def pltOrig(self,m,h=None):
|
||||||
ax=self.ax
|
ax=self.ax
|
||||||
# m is a 4x4 matrix. the transformed matrix
|
# m is a 4x4 matrix. the transformed matrix
|
||||||
@@ -603,7 +556,6 @@ class HelicalScan:
|
|||||||
h.set_segments(lines)
|
h.set_segments(lines)
|
||||||
return h
|
return h
|
||||||
|
|
||||||
|
|
||||||
def pltCrist(self,cx=0,cz=0,w=0,fy=0,h=None):
|
def pltCrist(self,cx=0,cz=0,w=0,fy=0,h=None):
|
||||||
#h are the handles
|
#h are the handles
|
||||||
ax = self.ax
|
ax = self.ax
|
||||||
@@ -661,8 +613,6 @@ class HelicalScan:
|
|||||||
|
|
||||||
hlc=h[5]
|
hlc=h[5]
|
||||||
hlc.set_segments(lines)
|
hlc.set_segments(lines)
|
||||||
|
|
||||||
|
|
||||||
return (h,pt)
|
return (h,pt)
|
||||||
|
|
||||||
def get_meas_lines(self,pt,cx,cz,fy,w):
|
def get_meas_lines(self,pt,cx,cz,fy,w):
|
||||||
@@ -702,7 +652,6 @@ class HelicalScan:
|
|||||||
ampl=np.absolute(f[idx])*2/n
|
ampl=np.absolute(f[idx])*2/n
|
||||||
return (bias,ampl,phase)
|
return (bias,ampl,phase)
|
||||||
|
|
||||||
|
|
||||||
def axSetCenter(self,v,l):
|
def axSetCenter(self,v,l):
|
||||||
ax=self.ax
|
ax=self.ax
|
||||||
#v=center vector, l= length of each axis
|
#v=center vector, l= length of each axis
|
||||||
@@ -711,8 +660,9 @@ class HelicalScan:
|
|||||||
ax.set_ylim(v[0]-l2, v[0]+l2);
|
ax.set_ylim(v[0]-l2, v[0]+l2);
|
||||||
ax.set_zlim(v[1]-l2, v[1]+l2)
|
ax.set_zlim(v[1]-l2, v[1]+l2)
|
||||||
|
|
||||||
|
def setup_coord_trf(self,fnCrdTrf='/tmp/coordTrf.cfg'):
|
||||||
def gen_coord_trf_code(self):
|
comm = self.comm
|
||||||
|
gpascii = comm.gpascii
|
||||||
param=self.param
|
param=self.param
|
||||||
prg = []
|
prg = []
|
||||||
prg.append('''
|
prg.append('''
|
||||||
@@ -834,10 +784,22 @@ close
|
|||||||
# (p1_x-p0_x)/(p1_y-p0_y)*vY velocity part in vqCX direction, when moving in vY
|
# (p1_x-p0_x)/(p1_y-p0_y)*vY velocity part in vqCX direction, when moving in vY
|
||||||
# vqW*p_x velocity part of the rotation (vqW is in rad)
|
# vqW*p_x velocity part of the rotation (vqW is in rad)
|
||||||
|
|
||||||
self.download(prg,mode=0,file='/tmp/coordTrf.cfg')
|
gpascii.send_block('disable plc 0')
|
||||||
|
time.sleep(.5)
|
||||||
|
gpascii.send_block(prg)
|
||||||
|
if self.verbose & 4:
|
||||||
|
for ln in prg:
|
||||||
|
print(ln)
|
||||||
|
if fnCrdTrf is not None :
|
||||||
|
fh=open(fnCrdTrf,'w')
|
||||||
|
fh.write('\n'.join(prg))
|
||||||
|
fh.close()
|
||||||
|
time.sleep(.5)
|
||||||
|
gpascii.send_block('enable plc 0')
|
||||||
|
time.sleep(.5)
|
||||||
|
gpascii.send_block('#1..7j/')
|
||||||
|
|
||||||
|
def setup_motion(self,prgId=2,fnPrg=None,mode=0,**kwargs):
|
||||||
def gen_prog(self,prgId=2,mode=0,**kwargs):
|
|
||||||
'''
|
'''
|
||||||
kwargs:
|
kwargs:
|
||||||
acq_per : acquire period: acquire data all acq_per servo loops (default=1)
|
acq_per : acquire period: acquire data all acq_per servo loops (default=1)
|
||||||
@@ -1008,7 +970,6 @@ close
|
|||||||
|
|
||||||
self.download(prg,mode=3,file='/tmp/prg.cfg')
|
self.download(prg,mode=3,file='/tmp/prg.cfg')
|
||||||
|
|
||||||
|
|
||||||
def download(self,prg=None,mode=0,file='/tmp/helicalscan.cfg'):
|
def download(self,prg=None,mode=0,file='/tmp/helicalscan.cfg'):
|
||||||
'''
|
'''
|
||||||
mode bits:
|
mode bits:
|
||||||
@@ -1016,8 +977,8 @@ close
|
|||||||
bit 1 (2): gather and save data
|
bit 1 (2): gather and save data
|
||||||
bit 2 (4): ...
|
bit 2 (4): ...
|
||||||
'''
|
'''
|
||||||
host=self.args.host
|
host=self.host
|
||||||
if prg is not None and self.args.verbose & 4:
|
if prg is not None and self.verbose & 4:
|
||||||
for ln in prg:
|
for ln in prg:
|
||||||
print(ln)
|
print(ln)
|
||||||
|
|
||||||
@@ -1103,46 +1064,15 @@ class GpasciiCommunicator():
|
|||||||
return p
|
return p
|
||||||
|
|
||||||
if __name__=='__main__':
|
if __name__=='__main__':
|
||||||
from optparse import OptionParser, IndentedHelpFormatter
|
def run_test(args):
|
||||||
class MyFormatter(IndentedHelpFormatter):
|
if args.host is None:
|
||||||
'helper class for formating the OptionParser'
|
comm=gather=None
|
||||||
|
else:
|
||||||
def __init__(self):
|
comm = PPComm(host=args.host)
|
||||||
IndentedHelpFormatter.__init__(self)
|
gather = Gather(comm)
|
||||||
|
gpascii = comm.gpascii
|
||||||
def format_epilog(self, epilog):
|
hs=HelicalScan(comm, gather, args.verbose)
|
||||||
if epilog:
|
hs.host=args.host # temporary
|
||||||
return epilog
|
|
||||||
else:
|
|
||||||
return ""
|
|
||||||
|
|
||||||
def parse_args():
|
|
||||||
'main command line interpreter function'
|
|
||||||
#usage: gpasciiCommunicator.py --host=PPMACZT84 myPowerBRICK.cfg
|
|
||||||
(h, t)=os.path.split(sys.argv[0]);cmd='\n '+(t if len(h)>3 else sys.argv[0])+' '
|
|
||||||
exampleCmd=('-n',
|
|
||||||
'-v15'
|
|
||||||
)
|
|
||||||
epilog=__doc__+'''
|
|
||||||
Examples:'''+''.join(map(lambda s:cmd+s, exampleCmd))+'\n '
|
|
||||||
|
|
||||||
fmt=MyFormatter()
|
|
||||||
parser=OptionParser(epilog=epilog, formatter=fmt)
|
|
||||||
|
|
||||||
parser.add_option('-v', '--verbose', type="int", dest='verbose', help='verbosity bits (see below)', default=0)
|
|
||||||
parser.add_option('-n', '--dryrun', action='store_true', help='dryrun to stdout')
|
|
||||||
parser.add_option('--cfg', help='config file containing json configuration structure')
|
|
||||||
parser.add_option('--host', help='hostname')
|
|
||||||
|
|
||||||
(args, other)=parser.parse_args()
|
|
||||||
args.other=other
|
|
||||||
|
|
||||||
hs=HelicalScan(args)
|
|
||||||
hs.args.verbose = 255
|
|
||||||
#hs.args.host='MOTTEST-CPPM-CRM0485'
|
|
||||||
hs.args.host='SAR-CPPM-EXPMX1'
|
|
||||||
#SAR-CPPM-EXPMX1 MOTTEST-CPPM-CRM0485
|
|
||||||
#hs.sequencer()
|
|
||||||
#hs.test_find_rot_ctr()
|
#hs.test_find_rot_ctr()
|
||||||
#hs.test_find_rot_ctr(n=5. ,per=1.,bias=2.31,ampl=4.12,phi=24.6)
|
#hs.test_find_rot_ctr(n=5. ,per=1.,bias=2.31,ampl=4.12,phi=24.6)
|
||||||
|
|
||||||
@@ -1169,15 +1099,7 @@ Examples:'''+''.join(map(lambda s:cmd+s, exampleCmd))+'\n '
|
|||||||
hs.download(['$$$***','!common()','!SAR-EXPMX1()','#1..7j/','enable plc 1','Motor[1].MaxSpeed=25','Motor[2].MaxSpeed=25'])
|
hs.download(['$$$***','!common()','!SAR-EXPMX1()','#1..7j/','enable plc 1','Motor[1].MaxSpeed=25','Motor[2].MaxSpeed=25'])
|
||||||
raw_input('press return when homed')
|
raw_input('press return when homed')
|
||||||
if mode&4:
|
if mode&4:
|
||||||
hs.download(['disable plc 0',])
|
hs.setup_coord_trf()
|
||||||
time.sleep(.5)
|
|
||||||
hs.gen_coord_trf_code()
|
|
||||||
print ('gen_coord_trf_code')
|
|
||||||
time.sleep(.5)
|
|
||||||
hs.download(['enable plc 0',])
|
|
||||||
time.sleep(.5)
|
|
||||||
hs.download(['#1..7j/',])
|
|
||||||
time.sleep(.5)
|
|
||||||
|
|
||||||
#hs.gen_prog(mode=-1)
|
#hs.gen_prog(mode=-1)
|
||||||
#hs.gen_prog(mode=0,cntHor=1,cntVert=3,wRng=(120000,120000))
|
#hs.gen_prog(mode=0,cntHor=1,cntVert=3,wRng=(120000,120000))
|
||||||
@@ -1193,7 +1115,7 @@ Examples:'''+''.join(map(lambda s:cmd+s, exampleCmd))+'\n '
|
|||||||
#hs.gen_prog(mode=0,cntHor=3,cntVert=10,hRng=(-5,5),wRng=(0,120000))
|
#hs.gen_prog(mode=0,cntHor=3,cntVert=10,hRng=(-5,5),wRng=(0,120000))
|
||||||
#hs.gen_prog(mode=0,cntHor=3,cntVert=25,hRng=(-5,5),wRng=(0,120000))
|
#hs.gen_prog(mode=0,cntHor=3,cntVert=25,hRng=(-5,5),wRng=(0,120000))
|
||||||
#hs.gen_prog(mode=1,cntHor=3,cntVert=25,hRng=(-5,5),wRng=(0,120000),smt=0,pt2pt_time=300)
|
#hs.gen_prog(mode=1,cntHor=3,cntVert=25,hRng=(-5,5),wRng=(0,120000),smt=0,pt2pt_time=300)
|
||||||
hs.gen_prog(mode=1,cntHor=5,cntVert=25,hRng=(-100,100),wRng=(0,120000),smt=0,pt2pt_time=300)
|
hs.setup_motion(mode=1,cntHor=5,cntVert=25,hRng=(-100,100),wRng=(0,120000),smt=0,pt2pt_time=300)
|
||||||
#hs.gen_prog(mode=1,cntHor=5,cntVert=25,hRng=(-100,100),wRng=(0,120000),smt=0,pt2pt_time=40)
|
#hs.gen_prog(mode=1,cntHor=5,cntVert=25,hRng=(-100,100),wRng=(0,120000),smt=0,pt2pt_time=40)
|
||||||
#hs.gen_prog(mode=1,cntHor=3,cntVert=20,hRng=(-5,5),wRng=(0,1200),smt=0,pt2pt_time=200)
|
#hs.gen_prog(mode=1,cntHor=3,cntVert=20,hRng=(-5,5),wRng=(0,1200),smt=0,pt2pt_time=200)
|
||||||
#hs.gen_prog(mode=1, cntHor=2, cntVert=2, wRng=(0, 360000), smt=0)
|
#hs.gen_prog(mode=1, cntHor=2, cntVert=2, wRng=(0, 360000), smt=0)
|
||||||
@@ -1207,6 +1129,42 @@ Examples:'''+''.join(map(lambda s:cmd+s, exampleCmd))+'\n '
|
|||||||
#hs.show_vel(); plt.show()
|
#hs.show_vel(); plt.show()
|
||||||
#hs.show_pos(); plt.show()
|
#hs.show_pos(); plt.show()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
from optparse import OptionParser, IndentedHelpFormatter
|
||||||
|
class MyFormatter(IndentedHelpFormatter):
|
||||||
|
'helper class for formating the OptionParser'
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
IndentedHelpFormatter.__init__(self)
|
||||||
|
|
||||||
|
def format_epilog(self, epilog):
|
||||||
|
if epilog:
|
||||||
|
return epilog
|
||||||
|
else:
|
||||||
|
return ""
|
||||||
|
|
||||||
|
def parse_args():
|
||||||
|
'main command line interpreter function'
|
||||||
|
#usage: gpasciiCommunicator.py --host=PPMACZT84 myPowerBRICK.cfg
|
||||||
|
(h, t)=os.path.split(sys.argv[0]);cmd='\n '+(t if len(h)>3 else sys.argv[0])+' '
|
||||||
|
exampleCmd=('-n',
|
||||||
|
'-v15'
|
||||||
|
)
|
||||||
|
epilog=__doc__+'''
|
||||||
|
Examples:'''+''.join(map(lambda s:cmd+s, exampleCmd))+'\n '
|
||||||
|
|
||||||
|
fmt=MyFormatter()
|
||||||
|
parser=OptionParser(epilog=epilog, formatter=fmt)
|
||||||
|
|
||||||
|
parser.add_option('-v', '--verbose', type="int", dest='verbose', help='verbosity bits (see below)', default=255)
|
||||||
|
parser.add_option('--host', help='hostname', default='SAR-CPPM-EXPMX1')
|
||||||
|
|
||||||
|
(args, other)=parser.parse_args()
|
||||||
|
args.other=other
|
||||||
|
run_test(args)
|
||||||
return
|
return
|
||||||
|
|
||||||
#------------------ Main Code ----------------------------------
|
#------------------ Main Code ----------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user