sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #59392
Re: [Question #210973]: Sikuli code organization / code reuse
Question #210973 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/210973
Marko Ivanetic posted a new comment:
To those still using this tool in 2024, I have pretty much given up on figuring out how code splitting works.
I realised that the project work best when everything is in one folder....
So I made my own quick python budler, you can check it out here and copy it:
https://pastebin.com/tqxA8KQG
1) save it as bundle.py in your project root
2) run it with "python3 bundle.py" or "python bundle.py"
3) it will watch for all .py files inside of main/sikuli
4) it will sort the files alphabetically and bundle them into one (copy pasting one beneath each other)
5) it will generate output.py
Open output.py and keep it open in your sikulix IDE, run it after every change.
I use VScode to edit code and IDE just to run it.
Example folder structure:
- bundle.py
- main.sikuli/
- - main.py
- - a_sub.py
- - b_utility.py
- - c_resources.py
- - output.py
- - image_1.png
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.