Advertisement
Guest User

Importin Python modules in Sikuli

a guest
Apr 19th, 2012
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. #In articles.py (main Sikuli script):
  2.  
  3. # import organizing code start
  4. import sys
  5. myLib = "/Projects/Sikuli/articles.sikuli/"
  6. if not myLib in sys.path:
  7.     sys.path.append(myLib)
  8.  
  9. # making unit reload under the IDE (workaround)
  10. if 'webmoves' in sys.modules:
  11.      del sys.modules['webmoves']
  12.      webmoves = None
  13.      del webmoves
  14. # importing your unit
  15. from webmoves import *
  16.  
  17. # import organizing code end
  18.  
  19.  
  20.  
  21.  
  22. #In webmoves.py (Python module):
  23.  
  24. # import start
  25. import sys
  26. sys.path.append("/Program Files/Sikuli")
  27. from sikuli.Sikuli import *
  28. # import end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement