Multiple .py files

Asked by W on 2020-10-05

I want to use multiple .py files in my Sikulix project, as using only one file does not only have bad readability it also is a bad practice.

How can I configure imports in my files to achieve that.

Example:
pathtoapp/Application.sikuli/Application.py is the main logic file.

I wan't to move parts of logic to difrent .py files:
pathtoapp/Application.sikuli/Code/HelperClass1.py
pathtoapp/Application.sikuli/Code/HelperClass2.py
pathtoapp/Application.sikuli/Code/HelperClass3.py

HelperClass should be able to use logic from Sikulix like Region or other classes.

I want to be able to run it form command line, running from a IDE would be a boon but it's not a necessity.

Cheers

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2020-10-05
Last reply:
2020-10-05

Can you help with this problem?

Provide an answer of your own, or ask W for more information if necessary.

To post a message you must log in.