Is there a RH8 scripteditor alternative for "_ResetEngine"?

Hi there,

During development of python scripts for Rhino I often want to reload my modules.

in Rhino7 I included _ResetEngine argument in the rhino command like so:
runPythonScript _ResetEngine "C:/path/to/myscript.py"
Resetting the python engine enforced my modules to be reloaded

Is there a similar method to do this in rhino8?

Thanks,
Tim

N.B. I am not looking for a way to do this manually: from ScriptEditor run the Tools > Advanced > Reset Python 3 Runtime

1 Like

Not at the moment but I’ll add support for that using the same syntax:

RH-80381 Provide support for _ResetEngine option in RunPythonScript

Implemented in 8.6 RC

2 Likes

Hi @eirannejad ,

Is there a similar method available for ‘ScriptEditor’ e.g. ‘-ScriptEditor _ResetEngine “path/to/my/script.py”’

or maybe a way to reload my modules whenever the files have been changed in an external editor?

Thanks,
Tim

Add this line somewhere at the top of your python script. The ScriptEditor will take care of resetting the engine

# flag: python.reloadEngine

1 Like