← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #242288]: How to import Sikuli file but not run it immediately?

 

Question #242288 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/242288

RaiMan posted a new comment:
Then it is no magic, I guess:

When working in the IDE, an imported module is only loaded the first
time the script is run. On a rerun, the import simply does nothing,
because in the IDE the internal state is not reset with respect to
imports.

Therefor if you change the imported module after it was imported and
rerun the main script, the changes are not reflected.

The solution is to either stop and restart the IDE or to use
import module
reload(module)

which is the recommended solution when working in the IDE while working
on the module and testing it.

The docs know more: http://doc.sikuli.org/globals.html#importing-other-
sikuli-scripts-reuse-code-and-images

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.