Integrating an embedded Python interpreter with a third party IDE

134 Views Asked by At

I am in the early design phase of an application (in C) that will be embedding a Python interpreter to provide plugins. Because of the intended users of the application, Python is the only option. I would like for the users to be able to use Pycharm, VS Code, or any other editor to write their Python code. I believe that debugging should work out of the box and both editors can connect to an embedded Python instance and debug it. The question is for auto-complete and configuring Pycharm. The plugin API from my application will be exposed via the embedded interpreter. I can't expose the API via an external module written in C as it will not allow for efficient communication with the host C app. Can Pycharm get auto-complete data from modules that are provided by the application hosting the Python interpreter? I also can't tell from the Pycharm documentation if Pycharm can be configured to recognize the embedded interpreter as the project's interpreter.

Pycharm seems to expect a Python executable to configure a Pycharm project. Of course my own application is an executable but it would not have the rest of the Python interpreters files sitting next to it so I don't think Pycharm would be able to recognize the interpreter and therefor unable to provide auto-complete, debug, etc. behaviour.

Your advice and thoughts are appreciated!

0

There are 0 best solutions below