sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #52515
Re: [Question #683842]: [1.1.4]After run removeImagePath() , the result of getImagePath() is abnormal.
Question #683842 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/683842
Status: Open => Answered
RaiMan proposed the following answer:
I made the following test with latest build of 1.1.4 and did not find
any oddities:
#main script cMain.sikuli
import aSub
print "*** from C"
for e in getImagePath(): print e
exit()
removeImagePath(getParentFolder() + "bSub.sikuli")
print "*** from C after remove"
for e in getImagePath(): print e
#sub script aSub.sikuli
from sikuli import *
print "aSub imported"
import bSub
#sub script bSub.sikuli
from sikuli import *
print "bSub imported"
- starting IDE
- opening all scripts
- run cMain
#output:
aSub imported
bSub imported
*** from C
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/cMain.sikuli
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/aSub.sikuli
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/bSub.sikuli
- now I comment out the exit() so the removeImagePath is processed on
rerunning cMain
#output:
*** from C
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/cMain.sikuli
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/aSub.sikuli
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/bSub.sikuli
*** from C after remove
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/cMain.sikuli
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/aSub.sikuli
- now I rerun cMain and get:
*** from C
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/cMain.sikuli
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/aSub.sikuli
*** from C after remove
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/cMain.sikuli
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/aSub.sikuli
- same output for every rerun of cMain
If I start the IDE and run cMain without the exit(), I get:
aSub imported
bSub imported
*** from C
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/cMain.sikuli
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/aSub.sikuli
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/bSub.sikuli
*** from C after remove
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/cMain.sikuli
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/aSub.sikuli
and on every rerun:
*** from C
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/cMain.sikuli
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/aSub.sikuli
*** from C after remove
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/cMain.sikuli
/Users/raimundhocke/IdeaProjects/_SUPPORT/Linda/aSub.sikuli
BE AWARE:
if you do any changes in aSub or bSub in the same IDE session, then on rerun of cMain the changed sub(s) are automatically reimported (reload()), but the ImagePath is not touched.
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.