← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #688984]: IDE: imported helper.py files are not automatically reimported if changed

 

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

SeltiX posted a new comment:
hello again,

i sucefully structured the project as you said, just resuming :

├── myapp.sikuli/
│ ├── myapp.py

  |── helpers.sikuli/
│ ├── helpers.py

 |── images.sikuli/
│ ├── images.py
│ ├── all my image files....


# myapp.py :

import helpers
import images
...
pattern = images.getImageByName("...")
example = helpers.functionName()


# helpers.py ( used in myapp.py and images.py )

(nothing to import)


# images.py ( used in myapp.py to return Pattern() images by name )
import helpers
from sikuli import *
...
example = helpers.functionName()


RESULT :
- the imported files are now automatically reloading on each execution as expected
- the images still does not realod if replaced ( only after close/open sikulix-2.0.3.jar) : this reload is important when youre tweaking the image with editor

I also already try the final step of "export as jar" (since I want to
share my project with my "normal users" work friends and for that I wold
need some type of EXE or a "one file" Java executable (for simplity of
sharing and for code protection), and after reading this
(https://answers.launchpad.net/sikuli/+question/688604) I have a
question and another problem :

- you said the jar file is just a zip-container but after opening it with 7zip all the files are encoded, I supose they are not reversible right?
- the "java -jar" command works but only when there is no imports like mine. If I import "helpers" or "images" the jar will not work :
[error] script [ gogbot$py.class ] stopped with error at line --unknown--
[error] --UnKnown-- ( --UnKnown-- )

( btw, the "Export as jar" options still shows a popup at the end with
"not set" text )

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.