WISH: RunPythonScript() to accept user/system variables

like so: -_RunPythonScript("%temp%\myscripts\currentScript.py")

Currently it doesn’t.

Thanks in advance.

Got that. thanks

https://mcneel.myjetbrains.com/youtrack/issue/RH-51401

-Pascal

1 Like

So following my success with the home directory here is a solution for the temp directory:
I put the HelloPython.py sample file in a folder called test in my windows temp directory and then ran the following script
! -_RunPythonScript "import os;import imp;import tempfile;temppath = tempfile.gettempdir();os.path.expanduser('~');my_path=r'test\HelloPython.py';imp.load_source('HelloPython', os.path.join(temppath,my_path))"

1 Like