← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #230996]: load config file without absolute path

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Already thought, that it is in this direction ;-)

When rerunning a script in the IDE, imports are not automatically
redone, since the the same interpreter is used (which saves the 3-5 secs
startup at script run with all runs after the first).

The current workaround in the IDE is

import sub
reload(sub)

this works fine for modules/scripts, that are robust against being
imported again in the same interpreter session (only contain callable
code, means no code on indent level 0, that cannot be repeated).

So if your sub only contains some def()s, that are called after import,
this fixes your problem.

I have an entry on the request list (low prio though ;-), to implement a
more elegant solution.

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