Ctypes Library - How to use C++ Functions in Python Code

preview_player
Показать описание
In this tutorial we will explore how to use C++ with Python. Using C with Python is fairly simple, but there is one additional change we need to make to our code before we can use C++ with it.

Рекомендации по теме
Комментарии
Автор

You really explain very clear, please upload more ctype videos

MARIO-tbtr
Автор

Hello, I am a beginner in C++ and am a mainly python coder. I wanted to integrate some C++ code into my python GUI and so went through all the steps in this video (also saw the other video that went over calling functions but in C).

I am facing a problem that whenever I run my python code, I always get the error -
"OSError: [WinError 193] %1 is not a valid Win32 application" correlating to the shared file.

From what I understood, the shared file is getting created as a 32 bit structure file, but as my device is a 64 bit structure, it is throwing this error. Can the shared file be created with a 64 bit architecture, or if you have any other suggestions on how to solve this issue, please help.

P.S. Great video, helped me a lot. Cheers man!!!

saarangarora
Автор

Is there a way to load hpp files? Thanks for the videos! You are the best!

tamar
Автор

Thank you very much. Can you please upload more videos about ctypes?

mohammadyahya
Автор

Can you help me? I use PyCharm. When I try to do it with the .c file it works. But when I try to do it with the .cpp file, I get the FileNotFoundError.

lysovychi
Автор

bro i know there are no classes in c either but is there any way we can use c++ classes for this exact job.

kanwaradnan