I'm writing a Pycharm plugin that executes commands in Python console. For that, I'm using, for example:
PyExecuteInConsole.executeCodeInConsole(prj, "import math", null, true, true, false, null);
That works fine, when the console is already opened and the python interpreter has started. However, if no Python Console is active, the PyExecuteInConsole() starts a new one, but does not execute the:
because, the python interpreter needs a little time to initiate.
My question is: How do I wait for the new Python Console to start and be ready, before I call the PyExecuteInConsole() ?