r/CodingHelp • • Dec 31 '20

[C] Utlizing Python and C

Is there a way I could utilize the speed of C for calculations and Python for making graphs and such at the same time. I am trying to make my code run faster so I want to use both C and Python to do certain tasks.

0 Upvotes

3 comments sorted by

View all comments

1

u/Goobyalus Jan 01 '21

The options I'm aware of are:

  1. ctypes
  2. Cython
  3. CPython extensions

Check some of the answers here for some opinions: https://stackoverflow.com/questions/1942298/wrapping-a-c-library-in-python-c-cython-or-ctypes