Answer the question
In order to leave comments, you need to log in
Why do I need to use a bunch of c ++ and python?
I often heard about applications written using a bunch of C ++ and Python. Very interested. What type of applications are written this way? What is such a bundle used for and how is it convenient? Which tasks are assigned to C ++, and which - to Python?
PS I would also be very grateful for any interesting manuals on the topic of integrating C ++ and Python in a single application.
PPS How convenient is it to write the application logic in C++, and the graphical (or web) interface in Python?
Answer the question
In order to leave comments, you need to log in
If you wrote something more complicated than a helloword in python, then you probably used modules that are written in C / C ++ + Cython.
Well, offhand from the popular:
Numpy - fast calculations over arrays. The kernel is written in C.
PyCUDA - access to CUDA.
There are 3 main cases where you need native code:
1) The speed of python calculations is too slow for you. If it is not possible to change the algorithm to a more optimal one, then it is necessary to transfer the calculations to native code.
2) Access to iron. If you need to communicate with some kind of hardware, then native code is the way to go.
3) Bindings. If you already have some kind of native library, say OpenGL, CUDA, Qt, and you want to use it from python, you will have to write a wrapper (or find a ready-made one).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question