Jump to content
  • Advertisement
Sign in to follow this  
twix

Communication between multiple python interpreters?

This topic is 4057 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
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]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!