AWS Thinkbox Discussion Forums

python.net, importable .net libs in cpython

We discussed this at siggraph, but wanted to make a semi official thread on this.

The main reason we used python.net at frantic/prime, was to be able to load .net modules from python. That way we could integrate c# pipeline code into nuke/maya, basically anything that supported python.
Following the same logic, it should be fairly easy to get the native deadline modules to import into cpython, thus giving us a true, native python API.

Something along these lines:

    import clr
    clr.AddReference(r'C:\Program Files\Thinkbox\Deadline6\bin\deadline.dll')
    from deadline import DeadlineScripts

Opinions?

cheers,
laszlo

I think the roadblocks that we ran into when we initially looked at this was on Linux and OSX, so I don’t know if it’s possible to support this on all platforms. I know the readme says that Python.NET should work fine on OSX/Linux, but I think that’s just the Python Runtime dll for embedding python in a .net application (pythonnet.sourceforge.net/readme.html). That being said, I would like to explore this on all platforms further just to make sure. Hopefully we’ll find some time later in the beta to explore this, and if we can make it work, we could include it with our dpython installation out of the box in a future release.

On Windows though, you should be able to install it to an existing python installation and start using it immediately:
sourceforge.net/projects/pythonnet/files/

Cheers,
Ryan

I gave it half an hour before posting the message, but ran into some build issues :\

But ill try it again later. Almost native python deadline libs, here we come…

Don’t do it! You’ll kill the possibility of getting an actual cross-platform Python API! :wink:

Hhaaha… well, i can only hope. But in the meantime, i need an api that doesnt depend on the webservice :slight_smile:

Privacy | Site terms | Cookie preferences