def preload_args_process(args): from hscom import helpers import sys # Process relevant args cids = args.query if args.vdd: helpers.vd(args.dbdir) args.vdd = False load_all = args.autoquery or len(cids) > 0 if helpers.inIPython() or '--cmd' in sys.argv: args.nosteal = True return load_all, cids
def parse_arguments(defaultdb, usedbcache): args = argparse2.parse_arguments(defaultdb=defaultdb) # Parse arguments args = argparse2.fix_args_with_cache(args) if usedbcache: if args.vdd: helpers.vd(args.dbdir) args.vdd = False if helpers.inIPython() or '--cmd' in sys.argv: args.nosteal = True params.args = args # Preload process args if args.delete_global: io.delete_global_cache() return args
def main_loop(app, is_root, back, runqtmain=True): from hscom import helpers as util from hsgui import guitools import sys hs = back.hs # NOQA # Allow for a IPython connection by passing the --cmd flag embedded = util.inIPython() if not embedded and util.get_flag('--cmd'): print('Embedding') util.embed() sys.exit(1) if not embedded and runqtmain: print('Running main loop') # If not in IPython run the QT main loop guitools.run_main_loop(app, is_root, back, frequency=100) signal_reset() print('hotspotter will exit')
def parse_arguments(defaultdb, usedbcache): from hscom import argparse2 from hscom import params from hscom import helpers as util from hscom import fileio as io import sys args = argparse2.parse_arguments(defaultdb=defaultdb) # Parse arguments args = argparse2.fix_args_with_cache(args) if usedbcache: if args.vdd: util.vd(args.dbdir) args.vdd = False if util.inIPython() or '--cmd' in sys.argv: args.nosteal = True params.args = args # Preload process args if args.delete_global: io.delete_global_cache() return args