X1.0-rc2 Import maintains old references
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
New
|
Undecided
|
Unassigned |
Bug Description
Sorry if duplicate...
When `import` is used IDE maintains the first reference to the imported script regardless of changes to referenced script
Example:
myScriptPath = "C:\\DEV\\Sikuli"
if not myScriptPath in sys.path: sys.path.
import LoginLogout
LoginLogout.Login()
regardless of changes to Login(), once IDE has imported LoginLogout (upon first run?), subsequent changes to LoginLogut have no change in operation of executing the function.
Reproduction:
Create a simple project
include the `from sikuli.Sikuli import * ` line as mentioned in the documentation
create a simple function that peforms 1 action popup("Message")
create another project as in the example above
execute the scripts (one calling the other)
change the popup message
notice the original message shows still
Thanks!!!
Yes, it is known, that the IDE does not reset at rerun of a script.
An easy workaround:
If you are in the development phase, just make your editing in the IDE, save your scripts and have a command line session open in parallel, where you run your script from command line. This starts from scratch every time, with the disadvantage of the 3-5 seconds startup latency.