def launch(hmc_type, callback, data=None): from dragonfly import (WaitWindow, FocusWindow, Key) instructions = _get_instructions(hmc_type) if data != None: instructions.append(data) Popen(instructions) hmc_title = _get_title(hmc_type) WaitWindow(title=hmc_title, timeout=5).execute() FocusWindow(title=hmc_title).execute() Key("tab").execute() from caster.asynch.hmc import squeue squeue.add_query(callback)
def launch(hmc_type, callback, data=None): from dragonfly import (WaitWindow, FocusWindow, Key) instructions=["pythonw", settings.SETTINGS["paths"]["HOMUNCULUS_PATH"], hmc_type] if data!=None: instructions.append(data) Popen(instructions) hmc_title=_get_title(hmc_type) WaitWindow(title=hmc_title, timeout=5)._execute() FocusWindow(title=hmc_title)._execute() Key("tab")._execute() from caster.asynch.hmc import squeue squeue.add_query(callback)
def launch(hmc_type, callback, data=None): from dragonfly import (WaitWindow, FocusWindow, Key) instructions=_get_instructions(hmc_type) if data!=None: instructions.append(data) Popen(instructions) hmc_title=_get_title(hmc_type) WaitWindow(title=hmc_title, timeout=5).execute() FocusWindow(title=hmc_title).execute() Key("tab").execute() from caster.asynch.hmc import squeue squeue.add_query(callback)