Open + execute saved PY scripts

Hey guys!

Is it possible to (within rhino python) open and execute saved scripts?

ie - run script:

  • open + execute script 1 (file path/etc)
  • open + execute script 2 (file path/etc)

Can I get python to do this within the rhino editor?
Just looking for a cleaner format! Thanks!

Does the ‘_RunPythonScript’ command not do what you need?
Alain

Hey Alain,

Errr. Just like an html script can pull up jpegs/other html files from a saved location (filepath). I need a script that opens + executes multiple saved scripts (compiles). Of course you can compile something like this in iron python (outside of rhino). I don’t think it’s possible to make it work within rhinopython though. I might just have to keep working with definitions/classes,unfortunately.

You can import the functionality of other files by using the import statement followed by a call to a function in the imported library.

Maybe I’m not understanding you question.

1 Like

Thanks Steve!!! Legend!!!

Yea, I didn’t know the correct terminology to ask properly. Thanks for that! Works well.