Extending Python with C/C++, Embedding C/C++ into Python

preview_player
Показать описание
This document describes how to write modules in C or C++ to extend the Python interpreter with new modules. Those modules can not only define new functions but also new object types and their methods. The document also describes how to embed the Python interpreter in another application, for use as an extension language. Finally, it shows how to compile and link extension modules so that they can be loaded dynamically (at run time) into the interpreter, if the underlying operating system supports this feature.

This document assumes basic knowledge about Python. For an informal introduction to the language, see The Python Tutorial. The Python Language Reference gives a more formal definition of the language. The Python Standard Library documents the existing object types, functions and modules (both built-in and written in Python) that give the language its wide application range.

For a detailed description of the whole Python/C API, see the separate Python/C API Reference Manual.
Рекомендации по теме
Комментарии
Автор

Why are there so many dislikes?
That was not bad.

muhammedyasinhanyasar
Автор

Ode an die Freude!
Great music and good tutorial :)

VlingoVideo
Автор

Very good video! Thank you a lot for help! Music is awesome

infamousx
Автор

Bạn ơi, với Python 3 thì sửa Py_InitModule như thế nào nhỉ? Tại mình dùng Python3, hướng dẫn của bạn là Python2. Trong Python3, họ dùng PyModule_Create thay cho Py_InitModule, nhưng mình chưa hiểu thay thế nào được ? Cảm ơn trước nhé

ThanhNguyen-rztf
Автор

Boom and you go right to my liked videos

brendendelong
Автор

hey you, thanks you for this video, i cant emdeding python into C.c++, so can you issue that video ?

chithangnguyen
Автор

When i run the command import ext in terminal i get the error --> ImportError: dynamic module does not define init function (initext)

himanshubansal
Автор

Is it possible to include a C++ library and call the library function under the embedded C++ function?

yuvarajvelumani
Автор

how is it possible to change the name of the module i tried but got the error

Import Error: dynamic module does not define init function (initmycpy)

the name i wanted it to have was mycpy

Kraja
Автор

Thanks for this! May I ask, I already download the .so file, how can i integrate the .so file into python? I am running windows8
 

JUEKUNLI
Автор

Can you add the scripts for us? please :) (link to download the files instructions, setup, ext, test, Task). Thanks a lot

leonardoteja
Автор

can u pls help me.i want to do the same in windows .how to do??

aakashprajapat
Автор

Go faster, people can pause the video you know

ctrlaltdebug
visit shbcf.ru