I notice that setting a search path does not work to allow Mac Rhino to find and run Python files - either in V6 or the current WIP - can anything be done here?
Just to make sure I understand, is the request to be able to use the
RunPythonScript command and feed it just the some_python_file.py filename, rather than a full-path?
Also, this isn’t a regression from V5 is it? (This never worked, as far as I can tell.)
Yep, that is it. On the Windows side, setting search paths allows Rhinoscript (not Python) to find script files. For Python to find scripts, one needs to set one or more paths in the Python script editor. (I’ve never really understood why this needs to be kept separate, but that’s another issue).
I understand the principal function of setting search paths is to find textures, image files etc. As a matter of fact, the Help for Windows does not even mention the fact that Rhinoscript also uses the set search paths to look for scripts… But I thought since Rhinoscript does not run on Mac, and Python does, that search paths might be a nice way of telling MacRhino where to look for Python scripts that are only specified by filename somewhere else besides the default scripts folder. For example, I keep all mine in Dropbox to have access from everywhere on several machines.
And no, this is not a regression from V5, just an enhancement request…
That makes sense to me. Thanks for the clarification.
RH-54696 RunPythonScript: Use File Search Paths
We aren’t going to do this. There will be separate search paths for python script on Mac just like Windows once we get some more work on the EditPythonScript command UI completed. This UI could eventually allow for an option to prepend or apped the standard Rhino file search paths, but they need to be separate.
OK, thanks Steve, as long as it will be possible at some point - and at least that way the instructions for doing this will be the same for both platforms.
Works for me.