Communication between multiple python interpreters?

Started by
0 comments, last by twix 16 years, 8 months ago
OK, so this is really weird, but bear with me please. [smile] I want to be able to use this program called PyMOL as a GUI for a program of mine. PyMOL has a Python API, as does my own program, and it would be really nice if I could just import them both and use them simultaneously. Unfortunately, through some kind of evil black magic, PyMOL seems to actually break the exception handling in any C++ code that runs in the same process... usually there will be segfaults in the code that allocates exceptions, and if not, the catch blocks will simply fail to work. It looks like this is related to something it does with multithreading, and I don't know if there's anything I can do about it. I'm not willing to give up my exception handling, so I was thinking of keeping my own code safe in an entirely separate Python interpreter process. Is there a reasonable way to have the two talk to each other? I'm currently using Linux, but it would be nice if it were also possible on other platforms. I guess I could use some kind of network-based remote call type of solution, but is there a simpler way?
Advertisement
Ah, never mind guys. While looking for Python RPC libraries I found RPyC, which lets me basically take complete control of a remote Python interpreter. That should work for what I need. [smile]

This topic is closed to new replies.

Advertisement