Y
Y
Yelpi2019-04-01 19:33:23
Python
Yelpi, 2019-04-01 19:33:23

Is it possible to link C(c++) and Python code?

Good afternoon. I am writing software for analyzing and processing some data in C. C doesn't provide any special tools for this (QT is not an option).
Googled it, it can be done quite easily in Python.
The next question is, is it possible to somehow connect plotting in Python and logic in C (or C ++)? If so, please share links to some material or tell us in general terms.
Thanks in advance.
ps It is advisable not to write something like this: "THIS WOULD BE USING THE QT GRAPHIC INTERFACE THE SAME!"

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Shitskov, 2019-04-01
@Zarom

How did you google? www.gnuplot.info
or
https://github.com/lava/matplotlib-cpp

D
Dmitry, 2019-04-01
@LazyTalent

one
two

R
res2001, 2019-04-01
@res2001

Beasley has a good introduction to writing modules in C. You can start with it, and for details, see the native documentation.
Since you are going to draw graphs, then, apparently, you need to transfer large amounts of data to python. This can be implemented in the buffer protocol
module . numpy knows how to work with such arrays. You can also create numpy arrays in the module right away, for this you need to use the Numpy C API .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question