Sign in to follow this  

Communication between multiple python interpreters?

This topic is 3773 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

This topic is 3773 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this