[Python.NET] Trouble getting Python for .NET to work in Ableton Live

Tijs Wickardt wickardt at xs4all.nl
Thu Dec 13 18:59:44 CET 2007

Thanks for the reply Brian, and also Christian Heimes and Feihong Hsu.

> Not sure how insane this is, but if you want to really roll your sleeves
> up you might be able to checkout the old python2.2-supporting branch of
> python.net and build it using the .NET 2.x tool chain.

I'll look into that, thanks

> If it works (no guarantees, but it might), then you should at least be
> able
> to load .net 2.x assemblies, though you wouldn't be able to leverage
> features that were supported in .net 1.0.

This shouldn't be too much of a restriction. If I build my assemblies with
.net 2.0 it should ( /might) work?

On problem though - how do i use the "pythonnet-2.0-alpha2" anyway in a
separate python? Can't seem to find anything about it in the docs. I can
build it using VS2005, but that gives me a python.exe and a
"Python.Runtime.dll", which I suspect is where all the magic is. If I say
"import Python.Runtime" from a normal python.exe, I get the message the

>>> import Python.Runtime
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named Python.Runtime

I guess what I'm doing doesn't make sense at all, Python.Runtime.dll is
probably a .net assembly. But how then?

> I don't know much about Ableton (I'm a Sonar guy...), but if they haven't
> done anything too weird to the python they ship with you could also
> investigate dropping in a newer python exe, dlls and libs...

Ableton comes as one big .exe (about 20MB). I'd have to hack it, and have
no idea how to do that...

> -Brian

Thanks, Tijs

P.S. Feihong:
Using popen2 wouldn't be the best workaround for me I think. Liveapi has a
telnet and OSC server that would probably serve me best. I'd prefer to use
.net directly however, and save me the overhead of socket traffic.
If it's not possible, it's not possible, and I'll use liveapi.

Thanks again, Tijs

More information about the PythonDotNet mailing list