Is there any way to add those Paths to the executed Python/IronPython scripts when submitting Python jobs to Deadline? It’d be great if they were mapped already and we didn’t have to add those paths manually in each Python script we submit to the farm.
Hi,
Under monitor, super user, repository options, “Python search paths”, you can add something like:
C:\Python25\Lib
C:\Python26\Lib
So that all you need to do in any script is “import re” to import a module.
You wouldn’t want to automatically import ALL modules into a script as this would be wasteful and time consuming.
Is this what you mean or am I getting confused?!
Oh and if you want to quickly remind yourself (ie: I use it all the time at work!) which modules are available natively in IronPython vs. CPython, then I wrote this quick script, available here:
however, I’m reporting here since I do indeed have those paths set properly in the repository opts. but when I try to import a os module, for example, in my IPy script, I get an error. I have to manually add to the Path and then import the module in each script.
I experienced this in the PreLoad.py, but I’ll be testing the Python submission scripts later tonight as well.
Thanks, but I want to deliberately avoid doing so.
I mainly want to source these paths since these are the only paths that are guaranteed to be correct and centralized. The render farm can be a mess (or when you want to set variables to something else on all the machines etc…).