← Back to team overview

sikuli-driver team mailing list archive

[Bug 704981] Re: [request] IDE: want a reset feature to get import repeated

 

I just realized it's hard to fix this issue shortly. This issue involves
with a bug of Jython that I reported long time ago but got no response.
As a result, Sikuli IDE has to recycle the same Python interpreter to
run scripts every time. Under this condition, the only solution I can
come up with now is to monitor what modules are imported by users and
delete them from sys.modules before running the user's scripts. (See the
following workaround.)

If you have a list of the modules needed to be reload, you can put the
following code in front of the main script to reload all of them without
writing many reloads.

for m in["mod1", "mod2", "mod3", ...]:
    if m in sys.modules: 
        del sys.modules[m]

import mod1, mod2, mod3

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/704981

Title:
  [request] IDE: want a reset feature to get import repeated

Status in Sikuli:
  Triaged

Bug description:
  With the new feature "import other .sikuli", you always have to
  restart the IDE, if something is changed in an imported script. This
  might be inconvenient, if some tabs are open.

  A button like the run-button would be helpful, that internally resets
  the IDE, so that imports are done again.


References