Reputation: 29645
I have a multi-threaded program. I want to embed a python interpreter. I don't want to use Python's threading; I want to have multiple copies of the Python interpreter running.
Thanks.
Upvotes: 2
Views: 595
Reputation: 798606
Python's interpreter uses global state, and as such you can only have one interpreter per process. You can try using multiprocessing
to run multiple processes, each with their own interpreter, but I'm not sure how well that would play with embedding.
Upvotes: 6