path wrong when doing import in a skl file
Hello
I'm following the document to import .sikuli file
there are 2 files:
one is import.sikuli, code is:
import os
myPath = os.path.
if not myPath in sys.path: sys.path.
import myLib
popup(myLib.
and anotner one is myLib.sikuli, the code:
from sikuli.Sikuli import *
def getStr():
return "string in myLib"
it works fine when I open the IDE and running it
and then I export the import.sikuli as import.skl, put it in the same folder to myLib.sikuli
but the import.skl is not running as expected
a error message was shown:
File "/var/folders/
import myLib
ImportError: No module named myLib
then, I put one line before import myLib in import.sikuli:
popup(getBundle
export it as .skl, then run it, I see the path is wrong, the popup window shows:
/var/folders/
how could I fix it ?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask randescr for more information if necessary.