Extending Python with C - Part 2

preview_player
Показать описание
This video is a continuation of the previous one.

Learn to extend python language by adding your C code to python and call those C functions from python.

Discover how to write the compilation script for the python extension module.
Рекомендации по теме
Комментарии
Автор

I never comment, like or subscribe but you did a fantastic job of explaining the concepts well enough for what I need. Thank you for taking the time

richardkelly
Автор

This works for Python2, Py_InitModule is not longer used in Python3. Any plans on updating this? :)

grimonce
Автор

Thank you very much for this clear and helpful video !

ninoofr
Автор

Do you have these example files downloadable for testing and experimentation? It's hard to type a new code while watching the video and making sure i don't have typos. Something to build on and play with would be helpful.

Hawatt
Автор

I have a C++ program which uses the Armadillo library and Boost Library. How do I link them? Terminal always told me it couldn't find the directory.

suiching
Автор

i was able to build and install . I m using windows and i can see that the exmod.pyd is there in site-packages folder. But when I import the exmod i get error
>>> import exmod
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.

Can u guide me as in what step is wrong?

robinsonvp
Автор

Thankyou for sharing your knowledge and request you to please add similar videos and specially how to execute already written C code which does not have any special Python objects, if there is any way possible...

parth.mandaliya
Автор

what is the setup procedure to build and install in windows

yuvarajvelumani
Автор

In command prompt after the function calling i have an extra line like this
sh: 1: this_is_an_error: not found

anyone please help whats is this and why its showing?

venkateshv
Автор

It might be a REAL GOOD IDEA to post the code

escapefelicity
Автор

hey i want to do what you did in these tutorials but a bit different. The code i run is my c++ code which activates an event based third party api stream from a python script. This stream is supposed to be able to call a method in a specific thread in my c++ code. Is this possible?

Thanks for the really nice and clean tutorial btw

kimroder
Автор

You should leave the completed source code somewhere to make this tutorial more useful. If anyones getting the an error about wrong type char, change this "if "(!PyArg_ParseTuple(args, "d d" to "if (!PyArg_ParseTuple(args, "dd""

gish