Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 import sys,os,platform
00018 import time
00019 import commands
00020
00021 nsport="2809"
00022 sysinfo = platform.uname()
00023 hostname= sysinfo[1]
00024 plat=sys.platform
00025
00026 if plat == "win32":
00027 os.system("start python ..\\..\\..\\bin\\rtm-naming.py")
00028 os.system("start python SliderComp.py")
00029 os.system("start python TkMotorComp.py")
00030 time.sleep(2)
00031 os.system("python Connector.py")
00032
00033 else:
00034 status,term=commands.getstatusoutput("which xterm")
00035 term += " -e"
00036 if status != 0:
00037 status,term=commands.getstatusoutput("which kterm")
00038 term += " -e"
00039
00040 if status != 0:
00041 status,term=commands.getstatusoutput("which uxterm")
00042 term += " -e"
00043
00044 if status != 0:
00045 status,term=commands.getstatusoutput("which gnome-terminal")
00046 term += " -x"
00047
00048 if status != 0:
00049 print "No terminal program (kterm/xterm/gnome-terminal) exists."
00050 exit
00051
00052 path = None
00053 for p in sys.path:
00054 if os.path.exists(os.path.join(p,"OpenRTM_aist")):
00055 path = os.path.join(p,"OpenRTM_aist","utils","rtm-naming")
00056 break
00057 if path is None:
00058 print "rtm-naming directory not exist."
00059 sys.exit(0)
00060
00061 os.system('python %s/rtm-naming.py &'%path)
00062 os.system('%s python SliderComp.py &'%term)
00063 os.system('%s python TkMotorComp.py &'%term)
00064 time.sleep(3)
00065 os.system("python Connector.py")