Sikuli 1.1.3: How to derive name of script?

Asked by Ron Turrentine on 2018-10-15

I have developed a "Control" script which processes a list of Sikuli scripts that it pulls from a SQL database. It does this by using the "setBundlePath" and "execfile" commands for each script in the list, running the .py file for each one.

My challenge is that I need to derive the currently-running script name from within the running script itself (not from within the Control script). I have tried using the sys.argv[0] system variable, but it always returns the name of the control script, which is the parent script. I need to pull the name of the running script (child script), though.

Is there a simple way (hopefully a system variable) that holds this information dynamically during runtime?

Thanks!

Ron Turrentine

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
Ron Turrentine
Solved:
2018-10-15
Last query:
2018-10-15
Last reply:
Ron Turrentine (oldtimerocker) said : #1

I figured it out! I realized that I could use "getBundlePath()" within the child scripts to pull back the current script name.

Thanks!

Ron