/[ascend]/trunk/test.py
ViewVC logotype

Diff of /trunk/test.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1104 by johnpye, Wed Jan 10 10:13:47 2007 UTC revision 1105 by johnpye, Wed Jan 10 11:22:20 2007 UTC
# Line 715  if __name__=='__main__': Line 715  if __name__=='__main__':
715          restart = 1          restart = 1
716    
717      if platform.system()=="Windows":      if platform.system()=="Windows":
718          LD_LIBRARY_PATTH="PATH"          LD_LIBRARY_PATH="PATH"
719          SEP = ";"          SEP = ";"
720      else:      else:
721          LD_LIBRARY_PATH="LD_LIBRARY_PATH"          LD_LIBRARY_PATH="LD_LIBRARY_PATH"
# Line 724  if __name__=='__main__': Line 724  if __name__=='__main__':
724      libdirs = ["pygtk","."]      libdirs = ["pygtk","."]
725      libdirs = [os.path.normpath(os.path.join(sys.path[0],l)) for l in libdirs]      libdirs = [os.path.normpath(os.path.join(sys.path[0],l)) for l in libdirs]
726      if not os.environ.get(LD_LIBRARY_PATH):      if not os.environ.get(LD_LIBRARY_PATH):
727          os.environ[LD_LIBRARY_PATH]=libdirs          #print "Setting %s" % LD_LIBRARY_PATH
728            os.environ[LD_LIBRARY_PATH]=SEP.join(libdirs)
729      else:      else:
730          envlibdirs = [os.path.normpath(i) for i in os.environ[LD_LIBRARY_PATH].split(SEP)]          envlibdirs = [os.path.normpath(i) for i in os.environ[LD_LIBRARY_PATH].split(SEP)]
731          for l in libdirs:          for l in libdirs:
# Line 744  if __name__=='__main__': Line 745  if __name__=='__main__':
745    
746      if restart:      if restart:
747          script = os.path.join(sys.path[0],"test.py")          script = os.path.join(sys.path[0],"test.py")
748            print "restarting with script = %s",script
749            print "                  argv = %s",sys.argv
750          os.execvp("python",[script] + sys.argv)          os.execvp("python",[script] + sys.argv)
751    
752      import ascpy      import ascpy

Legend:
Removed from v.1104  
changed lines
  Added in v.1105

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22