startcgi.py
Go to the documentation of this file.
1 #! /usr/bin/env python
2 
3 import time
4 start = time.time()
5 
6 import os,sys
7 
8 if 0:
9  ros_root = '/u/hassan/pr2/ros/'
10 
11  os.environ['ROS_ROOT'] = ros_root
12  os.environ['ROS_PACKAGE_PATH'] = '/u/hassan/pr2/ros-pkg/'
13  os.environ['ROS_MASTER_URI'] = 'http://localhost:11311/'
14  rospythonpath = os.path.join(ros_root, 'core/roslib/src')
15  os.environ['PYTHONPATH'] = rospythonpath
16  os.environ['ROS_BOOST_PATH'] = '/opt/ros/'
17 
18  sys.path.insert(0, rospythonpath)
19 
20  os.environ['HOME'] = '/tmp'
21 
22 os.environ['ROS_CACHE_TIMEOUT'] = '3600'
23 PKG = 'webui' # this package name
24 import roslib; roslib.load_manifest(PKG)
25 ros_root = os.environ['ROS_ROOT']
26 os.environ['PATH'] = os.path.join(ros_root, "bin") + ":" + os.environ['PATH']
27 
28 from pyclearsilver import log
29 from webui import cgistarter
30 
31 import config
32 
33 path,f = os.path.split(__file__)
34 os.chdir(path)
35 
36 cgistarter.setConfig(config)
37 
38 end = time.time()
39 
40 try:
41  start = time.time()
42  cgistarter.main(sys.argv, sys.stdout, os.environ)
43 finally:
44  end = time.time()
45  #sys.stderr.write("serve time %s\n" % int((end-start)*1000))
46 


webui
Author(s): Scott Hassan
autogenerated on Mon Jun 10 2019 15:51:24