import os import sys import shutil import urllib2 import optparse import time import hashlib sys.path.insert(0, os.path.abspath(os.path.join('pyol', 'config'))) sys.path.insert(0, os.path.abspath(os.path.join('pyol', 'tools'))) import OLBaseConfig import OLToolbox config = OLBaseConfig.get_config() #import argparse #parser = argparse.ArgumentParser( #description="""Download process code from a web server if a newer version #is available which is compatible with the installed #OpenLoops version.""") #parser.add_argument('processes', metavar='proc', nargs='*', #help="""process to download, #treated as a collection if it ends with '/'.""") #parser.add_argument('-i', '--ignore', action='store_true', #help='ignore non-existing processes and collections') #parser.add_argument('-f', '--force', action='store_true', #help='force download') #args = parser.parse_args()
sys.path.insert(0, os.path.abspath(os.path.join('pyol', 'tools'))) import OLBaseConfig import OLToolbox if sys.version_info < (3, 0, 0): from urllib2 import urlopen, URLError else: from urllib.request import urlopen from urllib.error import URLError commandline_options = [ arg.split('=', 1) for arg in sys.argv[1:] if ('=' in arg and not arg.startswith('-')) ] config = OLBaseConfig.get_config(commandline_options) if config['print_python_version']: print('download_process.py uses Python', sys.version) parser = argparse.ArgumentParser( description="""Download process code from a web server if a newer version is available which is compatible with the installed OpenLoops version.""") parser.add_argument('processes', metavar='proc', nargs='*', help="""process to download, treated as a collection if it ends with '/'.""") parser.add_argument('-i', '--ignore',
from __future__ import print_function import os import sys import atexit import ctypes import collections from ctypes import c_int, c_double, c_char_p, byref, POINTER import OLBaseConfig try: strtype = basestring except NameError: strtype = str config = OLBaseConfig.get_config() if config['print_python_version']: print('openloops.py uses Python', sys.version) openloops_path = os.getenv("OpenLoopsPath") proclib_dir = 'proclib' if len(openloops_path): proclib_dir = os.path.join(openloops_path, "proclib") c_int_ptr = POINTER(c_int) c_double_ptr = POINTER(c_double) TREE = 1 CC = 2 SC = 3
import os import sys import shutil import urllib2 import optparse import time import hashlib sys.path.insert(0, os.path.abspath(os.path.join('pyol', 'config'))) sys.path.insert(0, os.path.abspath(os.path.join('pyol', 'tools'))) import OLBaseConfig import OLToolbox commandline_options = [arg.split('=',1) for arg in sys.argv[1:] if ('=' in arg and not arg.startswith('-'))] config = OLBaseConfig.get_config(commandline_options) #import argparse #parser = argparse.ArgumentParser( #description="""Download process code from a web server if a newer version #is available which is compatible with the installed #OpenLoops version.""") #parser.add_argument('processes', metavar='proc', nargs='*', #help="""process to download, #treated as a collection if it ends with '/'.""") #parser.add_argument('-i', '--ignore', action='store_true', #help='ignore non-existing processes and collections') #parser.add_argument('-f', '--force', action='store_true', #help='force download') #args = parser.parse_args()