def dev_mode(back): # Help -> Developer Help steal_again = back.front.return_stdout() hs = back.hs # NOQA front = back.front wasBlocked = front.blockSignals(True) devmode = True # NOQA print(helpers.indent(str(hs), '[*back.hs] ')) rrr() print(r'[\back] finished dev_help') #app = back.app #from PyQt4 import QtGui #QtGui.qApp.quit() #app.exit() # Stop the main loop #app.quit() #if back.timer is not None: from PyQt4.QtCore import pyqtRemoveInputHook pyqtRemoveInputHook() #from IPython.lib.inputhook import enable_qt4 #enable_qt4() execstr = helpers.ipython_execstr() #print(execstr) print('Debugging in IPython. IPython will break gui until you exit') exec(execstr) if steal_again: back.front.steal_stdout() back.front.blockSignals(wasBlocked)
scripts.rrr() extr_enc_loc = scripts.extract_encounter(hs, eid) export_subdb_locals = extr_enc_loc['export_subdb_locals'] return extr_enc_loc, export_subdb_locals def do_generate_training(): generate_training.rrr() return generate_training.generate_detector_training_data( hs, (256, 448)) def do_import_database(): scripts.rrr() #from os.path import expanduser, join #workdir = expanduser('~/data/work') #other_dbdir = join(workdir, 'hsdb_exported_138_185_encounter_eid=1 nGxs=43') def vgd(): return generate_training.vgd(hs) #from PyQt4.QtCore import pyqtRemoveInputHook #from IPython.lib.inputhook import enable_qt4 #pyqtRemoveInputHook() #enable_qt4() exec(helpers.ipython_execstr()) sys.exit(1) if not embedded: # If not in IPython run the QT main loop guitools.run_main_loop(app, is_root, back, frequency=100) signal_reset()
eid = 'ex=61_nGxs=18' scripts.rrr() extr_enc_loc = scripts.extract_encounter(hs, eid) export_subdb_locals = extr_enc_loc['export_subdb_locals'] return extr_enc_loc, export_subdb_locals def do_generate_training(): generate_training.rrr() return generate_training.generate_detector_training_data(hs, (256, 448)) def do_import_database(): scripts.rrr() #from os.path import expanduser, join #workdir = expanduser('~/data/work') #other_dbdir = join(workdir, 'hsdb_exported_138_185_encounter_eid=1 nGxs=43') def vgd(): return generate_training.vgd(hs) #from PyQt4.QtCore import pyqtRemoveInputHook #from IPython.lib.inputhook import enable_qt4 #pyqtRemoveInputHook() #enable_qt4() exec(helpers.ipython_execstr()) sys.exit(1) if not embedded: # If not in IPython run the QT main loop guitools.run_main_loop(app, is_root, back, frequency=100) signal_reset()