예제 #1
0
 def ui_call():
     user_interface(readparent, writechild, backend_path)
예제 #2
0
checked = [os.path.exists(path) for path in check_backend_path]

if 1 in checked:
   backend_path = check_backend_path[checked.index(1)]

do_profile = 0

for o,a in opts:
   if (o == "-b") | (o == "--backend"):
      backend_path = a
   elif (o == "-h") | (o == "--help"):
      usage()
      sys.exit(0)
   elif (o == "-u") | (o == "--user-interface"):
      user_interface(sys.stdin, sys.stdout)
      sys.exit(0)
   elif (o == "-v") | (o == "--viz-level"):
       DfGlobal()["viz_level"] = eval(a)
   elif (o == "-p") | (o == "--profile"):
       do_profile = 1
       profile_file = a
       print "Profiling to: ",profile_file

print "\nUsing backend command: ", backend_path, "\n"

readchild, writechild = os.pipe()
readparent, writeparent = os.pipe()

pid = os.fork()
if pid: #parent