How to check if the interpreter has been initialized? #4157
Unanswered
leonleeann
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I know that
initialize_interpreter()
should be called before any accessing to the interpreter, and that it should be called only once.I'm wondering that "How to check if the interpreter has been initialized?", so as to decide to call that function or skip.
I don't think that is a good idea to store this state in some global variable, because if so, we have to maintain the sync between two.
Does PyBind11 offer such a API let us can check the state?
BTW, PyBind11 is a greate thing to me!
Thanx!
Beta Was this translation helpful? Give feedback.
All reactions