I have a python script that’s working well when I test it from the ShotGrid Python Console within RV. But I would like to run the script externally. I thought that the python interpreter would do the trick (/Applications/RV.app/Contents/MacOS/py-interp) but it can’t import the rv.commands module:
import rv.commands as rvc
ModuleNotFoundError: No module named ‘rv.commands’
Hi Bernie. These are helpful suggestions that I can play around with. But ultimately I don’t think exactly what I’m looking for.
To give more context, the script I’m writing is a custom RV session build to be launched from ShotGrid. Select your versions, click a button, and then the script will build an RV session with the files stacked with old versions, plates, etc.
So it’s a long enough script that embedding it in a pyeval command seems odd. The package suggestion could work, but that would mean the user would click a button in ShotGrid that would prep an input file somewhere, then click a button in RV to actually ingest said input file. Two clicks ain’t the end of the world, but it doesn’t feel like the ideal design.
I guess I just figured I was missing a path to a true python interpreter that has all of RV’s modules included. It seems to me like this desire to access the rv.commands module to prep a session externally would be relatively common.
So, still looking for input if there are any suggestions. But in the meantime, will use one of the options that you suggested.