Developing Python extension in C using PyCharm
Hi,
I'm developing python project and part of sources are in C (python extensions). I wonder if there are any tips in case of using PyCharm. AFAIK the recommended option is to actually not use PyCharm but CLion in such case (https://blog.jetbrains.com/clion/2016/01/python-support-in-clion/ or other posts in this forum) but am I the only one who thinks it would be awesome and very useful to have some C/C++ support from PyCharm. Obviously I can buy CLion (downloading it right now actually to evaluate it for my needs) but I strongly dislike the idea of switching between IDEs.
Second question: I'm using docker containers for development. Does anyone have any experience with debugging Python C extensions using any of JetBrains tools? Any tips would be welcome ;)
Alex
Please sign in to leave a comment.
> it would be awesome and very useful to have some C/C++ support from PyCharm.
Unfortunately, we don't have any plans to improve C/C++ support in PyCharm. You could only get basic syntax highlighting with TextMate bundles plugin: https://plugins.jetbrains.com/idea/plugin/7221-textmate-bundles-support.
Also we have the existing feature request: https://youtrack.jetbrains.com/issue/PY-21736, please vote for it to increase its priority and be notified about updates.
Please also try using CLion 2016.3.2. It's our IDE for C/C++ development which also has built-in Python and Docker support. You can debug python C extensions there, it should work. We will be glad to hear some feedback from you to clion-support at jetbrains.com!
Thanks for the tips. I've finished CLion evaluation just a few weeks ago. Unfortunately the cmake system and bugs like resting the Python interpreter on every startup makes is less useful than PyCharm for me. So I'll stick with PyCharm for now which is a great IDE BTW.
From what I can tell, CLion does not have the ability to develop Python extensions either. You might as well just use something like vi or emacs.
To develop Python extension modules you need to have the ability to understand some of setup.py. CLion requires CMakeLists.txt to perform any of the advanced (non text editor) functions.
I might be wrong, but so far have not worked out how to use CLion for developing Python extensions.