os.system not working calling sikuli scripts from the command prompt
Im trying to make a basic function to glob all of my sikuli scripts and run them in order. This is to make a standard main for a testing framework.
While this isn't necessarily a sikuli syntax issue, it is an issue with calling sikuli from the command prompt.
My script relies on os.system to call the functions. But the same exact string that I type into the cmd prompt that works there does not work with os.system. Heres the important syntax (I have the correct imports not shown)
files = glob.glob(
if len(files) is 0:
raise TestHelper.
for xfile in files:
logging.
os.
To step you through my code, here is whats going on.
It goes to the tests/ directory and finds all folders with .sikuli
This gets put into a list called files.
We do a quick check if there are files in this list, if not, toss a custom error.
then we loop through the list of files, getting a single file per time through.
We log whats going on
Then we call os.system to call sikuli via the command prompt. The code inside of the parenthesis gives the following output:
"C:/Program Files/Sikuli X/Sikuli-IDE-w.bat" -r "C:\MY_
You will notice the different \ after DIRECTORIES and before SikTest. This however does not cause an issue doing it manually and is needed for glob to work.
So I guess what I am asking is whether anyone else has experienced problems using os.system to call a sikuli script via the method described to call it via the command prompt, and if anyone has a workaround or can tell me what I am doing wrong.
Thanks
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 bcaine0 for more information if necessary.