Execute a Python script from any directory.

Hi everyone, 

I was experimenting with the Python runtime app and discovered that I can only run my script from the main folder activeConfiguration located at /var/snap/rexrothautomationcore/common/solutions/activeConfiguration. Even after setting all the necessary permissions for the folder and the script, it still only works from this specific directory. 

Is this due to security restrictions, or am I missing something? I don't want to clutter the main folder with multiple Python files.

Thank you

 

Best reply by Sgilk

test ,

Try using the symlink 'activeConfiguration/script/test.py'. The path you have listed is too long for a STRING(80). Both of your listed paths work in my test project attached. Set .HMI_Variables.bStartScript TRUE to execute the python script on interpreter instance Demo1.

Python_IOLink_Demo.7z
373.63KB
View original
script.txt
395B
5 replies