def init(local_run=False): paths.init(local_run, __path__[0])
import add import annotate import boxgallery import cover import csvdata import gui import ids import info import recognize import reorder import report import reporttex import setup import setuptex import stamp cmdline = script.parser.parse_args() cmdline = vars(cmdline) log.interactive("-" * 78 + "\n") log.interactive(("- SDAPS -- %s" % cmdline["_name"]) + "\n") log.interactive("-" * 78 + "\n") return cmdline["_func"](cmdline) # Guess whether documentation is generated, if it is # setup for local run. if "sphinx" in sys.argv[0]: paths.init(True, os.path.join(sys.path[0], "sdaps"))
def init(local_run=False): paths.init(local_run, __path__[0]) def main(local_run=False): u"""The main SDAPS interface routine. It initilizes all modules, parses the command line and passes control over to the selected function.""" init(local_run) import log log.activate_redirects() import cmdline cmdline = script.parser.parse_args() cmdline = vars(cmdline) log.interactive('-'*78 + '\n') log.interactive(('- SDAPS -- %s' % cmdline['_name']) + '\n') log.interactive('-'*78 + '\n') return cmdline['_func'](cmdline) # Guess whether documentation is generated, if it is # setup for local run. if 'sphinx' in sys.argv[0]: paths.init(True, os.path.join(sys.path[0], 'sdaps'))
the command line and passes control over to the selected function.""" init(local_run) import log log.activate_redirects() import cmdline cmdline = script.parser.parse_args() cmdline = vars(cmdline) log.interactive('-'*78 + '\n') log.interactive(('- SDAPS -- %s' % cmdline['_name']) + '\n') log.interactive('-'*78 + '\n') try: return cmdline['_func'](cmdline) except: import traceback string = traceback.format_exc() sys.stderr.write(string) sys.exit(1) # Guess whether documentation is generated, if it is # setup for local run. if 'sphinx' in sys.argv[0]: paths.init(True, os.path.join(sys.path[0], 'sdaps'))