tools.sort() # add current working dir to sys.path so user can import own modules # cwd isn't in sys.path when Pizza.py is launched sys.path.insert(0, '') # ------------------------------------------------------------------------- # PIZZA_SCRIPTS = list of dirs to look in to find scripts try: from DEFAULTS import PIZZA_SCRIPTS except: PIZZA_SCRIPTS = [] PIZZA_SCRIPTS = map(os.path.expanduser, PIZZA_SCRIPTS) PIZZA_SCRIPTS.insert(0, '.') PIZZA_SCRIPTS.append(sys.path[1][:-3] + "scripts") # path for pizza.py # run specified script files and commands in order specified # put arguments in argv so script can access them # check list of PIZZA_SCRIPTS dirs to find script file # catch errors so pizza.py will continue even if script is bad # traceback logic prints where in the script the error occurred for task in tasks: if task[0] == "script": argv = task[1] file = argv[0] try: flag = 0 for dir in PIZZA_SCRIPTS:
for tool in failed: tools.remove(tool) tools.sort() # add current working dir to sys.path so user can import own modules # cwd isn't in sys.path when Pizza.py is launched sys.path.insert(0,'') # ------------------------------------------------------------------------- # PIZZA_SCRIPTS = list of dirs to look in to find scripts try: from DEFAULTS import PIZZA_SCRIPTS except: PIZZA_SCRIPTS = [] PIZZA_SCRIPTS = map(os.path.expanduser,PIZZA_SCRIPTS) PIZZA_SCRIPTS.insert(0,'.') PIZZA_SCRIPTS.append(sys.path[1][:-3] + "scripts") # path for pizza.py # run specified script files and commands in order specified # put arguments in argv so script can access them # check list of PIZZA_SCRIPTS dirs to find script file # catch errors so pizza.py will continue even if script is bad # traceback logic prints where in the script the error occurred for task in tasks: if task[0] == "script": argv = task[1] file = argv[0] try: flag = 0 for dir in PIZZA_SCRIPTS: