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 def main():
00027 if plat == "win32":
00028 os.system("start python ..\\..\\..\\bin\\rtm-naming.py")
00029 os.system("start python ConsoleIn.py")
00030 os.system("start python Consoleout.py")
00031 time.sleep(3)
00032 os.system("python Connector.py")
00033
00034 else:
00035 status,term=commands.getstatusoutput("which xterm")
00036 term += " -e"
00037 if status != 0:
00038 status,term=commands.getstatusoutput("which kterm")
00039 term += " -e"
00040
00041 if status != 0:
00042 status,term=commands.getstatusoutput("which uxterm")
00043 term += " -e"
00044
00045 if status != 0:
00046 status,term=commands.getstatusoutput("which gnome-terminal")
00047 term += " -x"
00048
00049 if status != 0:
00050 print "No terminal program (kterm/xterm/gnome-terminal) exists."
00051 sys.exit(0)
00052
00053 path = None
00054 for p in sys.path:
00055 if os.path.exists(os.path.join(p,"OpenRTM_aist")):
00056 path = os.path.join(p,"OpenRTM_aist","utils","rtm-naming")
00057 break
00058 if path is None:
00059 print "rtm-naming directory not exist."
00060 sys.exit(0)
00061
00062 os.system('python %s/rtm-naming.py &'%path)
00063 os.system('%s python ConsoleIn.py &'%term)
00064 os.system('%s python ConsoleOut.py &'%term)
00065 time.sleep(3)
00066 os.system("python Connector.py")
00067
00068 return
00069
00070 if __name__ == "__main__":
00071 main()