SlideShare ist ein Scribd-Unternehmen logo
1 von 31
ctypes ,[object Object],[object Object],[object Object],C !
So what is python? ,[object Object],[object Object],[object Object],[object Object]
How does python work? ,[object Object],[object Object],[object Object]
Python Fundamentals ,[object Object],[object Object],[object Object],[object Object],[object Object]
C fundamentals ,[object Object],[object Object],[object Object],[object Object]
The need for bindings ,[object Object],[object Object],[object Object]
The “good old” way ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The “good old” way ,[object Object],[object Object],[object Object],[object Object]
SWIG: The Next Step ,[object Object],[object Object],[object Object],[object Object]
What’s wrong with SWIG? ,[object Object],[object Object],[object Object],[object Object],[object Object]
Enter ctypes! ,[object Object],[object Object],[object Object],[object Object]
What does this mean? ,[object Object],[object Object],[object Object]
How does it work? import ctypes import your library prepare parameters call the (next) function
Searching for libraries ,[object Object],[object Object],[object Object],[object Object]
Importing libraries ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Importing libraries ,[object Object],[object Object],[object Object],[object Object]
Accessing functions ,[object Object],[object Object],[object Object],[object Object]
Type conversion ,[object Object],[object Object],[object Object]
Some common ctypes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Mutability for strings ,[object Object],[object Object],[object Object],[object Object]
Specifying parameter types ,[object Object],[object Object],[object Object],[object Object]
Specifying return types ,[object Object],[object Object],[object Object],[object Object]
Using Pointers ,[object Object],[object Object],[object Object],[object Object]
Structures & Unions ,[object Object],[object Object],[object Object]
Structures & Unions ,[object Object],[object Object],[object Object],[object Object]
Forward declarations ,[object Object],[object Object],[object Object]
Arrays ,[object Object],[object Object],[object Object],[object Object]
Typecasting ,[object Object],[object Object],[object Object],[object Object]
Callbacks ,[object Object],[object Object],[object Object]
What now? ,[object Object],[object Object],[object Object]
Thank You! ,[object Object],[object Object],[object Object],[object Object]

Weitere ähnliche Inhalte

Was ist angesagt?

전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017
전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017
전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017
devCAT Studio, NEXON
 
Media Art II 2013 第4回:openFrameworks アニメーションを極める 動きを生みだす様々なアルゴリズム
Media Art II 2013  第4回:openFrameworks アニメーションを極める 動きを生みだす様々なアルゴリズムMedia Art II 2013  第4回:openFrameworks アニメーションを極める 動きを生みだす様々なアルゴリズム
Media Art II 2013 第4回:openFrameworks アニメーションを極める 動きを生みだす様々なアルゴリズム
Atsushi Tadokoro
 
Github codespaces すごく良い。もうこれで 十分なんじゃという話
Github codespaces すごく良い。もうこれで 十分なんじゃという話Github codespaces すごく良い。もうこれで 十分なんじゃという話
Github codespaces すごく良い。もうこれで 十分なんじゃという話
xiidec
 
Node-v0.12の新機能について
Node-v0.12の新機能についてNode-v0.12の新機能について
Node-v0.12の新機能について
shigeki_ohtsu
 

Was ist angesagt? (20)

Java OCA teoria 5
Java OCA teoria 5Java OCA teoria 5
Java OCA teoria 5
 
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
Jenkins 2.0 最新事情 〜Make Jenkins Great Again〜
 
전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017
전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017
전형규, 프로젝트DH의 절차적 애니메이션 시스템, NDC2017
 
iFunEngine: 30분 만에 게임 서버 만들기
iFunEngine: 30분 만에 게임 서버 만들기iFunEngine: 30분 만에 게임 서버 만들기
iFunEngine: 30분 만에 게임 서버 만들기
 
Javascript under the hood 1
Javascript under the hood 1Javascript under the hood 1
Javascript under the hood 1
 
【Unite Tokyo 2019】バンダイナムコスタジオ流Unityの使い方
【Unite Tokyo 2019】バンダイナムコスタジオ流Unityの使い方【Unite Tokyo 2019】バンダイナムコスタジオ流Unityの使い方
【Unite Tokyo 2019】バンダイナムコスタジオ流Unityの使い方
 
UE4 コリジョン検証 -HitとOverlapイベントが発生する条件について-
UE4 コリジョン検証 -HitとOverlapイベントが発生する条件について-UE4 コリジョン検証 -HitとOverlapイベントが発生する条件について-
UE4 コリジョン検証 -HitとOverlapイベントが発生する条件について-
 
Javaはどのように動くのか~スライドでわかるJVMの仕組み
Javaはどのように動くのか~スライドでわかるJVMの仕組みJavaはどのように動くのか~スライドでわかるJVMの仕組み
Javaはどのように動くのか~スライドでわかるJVMの仕組み
 
Yocto Project ハンズオン プレゼン用資料
Yocto Project ハンズオン プレゼン用資料Yocto Project ハンズオン プレゼン用資料
Yocto Project ハンズオン プレゼン用資料
 
Unity遊戲程式設計(01) Unity簡介
Unity遊戲程式設計(01) Unity簡介Unity遊戲程式設計(01) Unity簡介
Unity遊戲程式設計(01) Unity簡介
 
Media Art II 2013 第4回:openFrameworks アニメーションを極める 動きを生みだす様々なアルゴリズム
Media Art II 2013  第4回:openFrameworks アニメーションを極める 動きを生みだす様々なアルゴリズムMedia Art II 2013  第4回:openFrameworks アニメーションを極める 動きを生みだす様々なアルゴリズム
Media Art II 2013 第4回:openFrameworks アニメーションを極める 動きを生みだす様々なアルゴリズム
 
Unityではじめるオープンワールド入門 アーティスト編
Unityではじめるオープンワールド入門 アーティスト編Unityではじめるオープンワールド入門 アーティスト編
Unityではじめるオープンワールド入門 アーティスト編
 
【Unity道場 2017】PlayMakerによる初めてのUnityプログラミング
【Unity道場 2017】PlayMakerによる初めてのUnityプログラミング【Unity道場 2017】PlayMakerによる初めてのUnityプログラミング
【Unity道場 2017】PlayMakerによる初めてのUnityプログラミング
 
多機能ボイチャを簡単に導入する方法
多機能ボイチャを簡単に導入する方法多機能ボイチャを簡単に導入する方法
多機能ボイチャを簡単に導入する方法
 
Django congress jp 2019 make query great again! (slide share)
Django congress jp 2019 make query great again! (slide share)Django congress jp 2019 make query great again! (slide share)
Django congress jp 2019 make query great again! (slide share)
 
Github codespaces すごく良い。もうこれで 十分なんじゃという話
Github codespaces すごく良い。もうこれで 十分なんじゃという話Github codespaces すごく良い。もうこれで 十分なんじゃという話
Github codespaces すごく良い。もうこれで 十分なんじゃという話
 
Yocto bspを作ってみた
Yocto bspを作ってみたYocto bspを作ってみた
Yocto bspを作ってみた
 
Haskell超入門 Part.1
Haskell超入門 Part.1Haskell超入門 Part.1
Haskell超入門 Part.1
 
UE4を使った クロスシミュレーションと、 ハイエンド・モバイルゲーム制作の奥義を伝授!
UE4を使った クロスシミュレーションと、 ハイエンド・モバイルゲーム制作の奥義を伝授!UE4を使った クロスシミュレーションと、 ハイエンド・モバイルゲーム制作の奥義を伝授!
UE4を使った クロスシミュレーションと、 ハイエンド・モバイルゲーム制作の奥義を伝授!
 
Node-v0.12の新機能について
Node-v0.12の新機能についてNode-v0.12の新機能について
Node-v0.12の新機能について
 

Andere mochten auch (12)

ctypes拡張モジュール
ctypes拡張モジュールctypes拡張モジュール
ctypes拡張モジュール
 
Extending Python with ctypes
Extending Python with ctypesExtending Python with ctypes
Extending Python with ctypes
 
Python language data types
Python language data typesPython language data types
Python language data types
 
Python
Python Python
Python
 
Heroku
HerokuHeroku
Heroku
 
Pointers
PointersPointers
Pointers
 
Syntax and semantics
Syntax and semanticsSyntax and semantics
Syntax and semantics
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python
 
Unit 6 pointers
Unit 6   pointersUnit 6   pointers
Unit 6 pointers
 
Python Presentation
Python PresentationPython Presentation
Python Presentation
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 

Ähnlich wie C Types - Extending Python

Introduction to phyton , important topic
Introduction to phyton , important topicIntroduction to phyton , important topic
Introduction to phyton , important topic
akpgenious67
 
Python (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizePython (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualize
IruolagbePius
 

Ähnlich wie C Types - Extending Python (20)

Python_Unit_1.pdf
Python_Unit_1.pdfPython_Unit_1.pdf
Python_Unit_1.pdf
 
Python for katana
Python for katanaPython for katana
Python for katana
 
Python intro
Python introPython intro
Python intro
 
Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3
 
C++ Training
C++ TrainingC++ Training
C++ Training
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
 
Introduction to phyton , important topic
Introduction to phyton , important topicIntroduction to phyton , important topic
Introduction to phyton , important topic
 
UNIT IV (1).ppt
UNIT IV (1).pptUNIT IV (1).ppt
UNIT IV (1).ppt
 
Python (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizePython (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualize
 
C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1C, C++ Interview Questions Part - 1
C, C++ Interview Questions Part - 1
 
Python PPT.pptx
Python PPT.pptxPython PPT.pptx
Python PPT.pptx
 
presentation_intro_to_python
presentation_intro_to_pythonpresentation_intro_to_python
presentation_intro_to_python
 
presentation_intro_to_python_1462930390_181219.ppt
presentation_intro_to_python_1462930390_181219.pptpresentation_intro_to_python_1462930390_181219.ppt
presentation_intro_to_python_1462930390_181219.ppt
 
Python Course In Chandigarh
Python Course In ChandigarhPython Course In Chandigarh
Python Course In Chandigarh
 
SRAVANByCPP
SRAVANByCPPSRAVANByCPP
SRAVANByCPP
 
Python interview questions and answers
Python interview questions and answersPython interview questions and answers
Python interview questions and answers
 
2.Getting Started with C#.Net-(C#)
2.Getting Started with C#.Net-(C#)2.Getting Started with C#.Net-(C#)
2.Getting Started with C#.Net-(C#)
 
Boost.Python: C++ and Python Integration
Boost.Python: C++ and Python IntegrationBoost.Python: C++ and Python Integration
Boost.Python: C++ and Python Integration
 
Python Programming Basics for begginners
Python Programming Basics for begginnersPython Programming Basics for begginners
Python Programming Basics for begginners
 
C questions
C questionsC questions
C questions
 

Mehr von Priyank Kapadia

Authentication Modules For Linux - PAM Architecture
Authentication Modules For Linux - PAM ArchitectureAuthentication Modules For Linux - PAM Architecture
Authentication Modules For Linux - PAM Architecture
Priyank Kapadia
 

Mehr von Priyank Kapadia (15)

Ubuntu, Canonical and the release of Feisty
Ubuntu, Canonical and the release of FeistyUbuntu, Canonical and the release of Feisty
Ubuntu, Canonical and the release of Feisty
 
OLPC and INDIA
OLPC and INDIAOLPC and INDIA
OLPC and INDIA
 
Open Source - Hip not Hype
Open Source - Hip not HypeOpen Source - Hip not Hype
Open Source - Hip not Hype
 
How to start an Open Source Project
How to start an Open Source ProjectHow to start an Open Source Project
How to start an Open Source Project
 
Developing Multilingual Applications
Developing Multilingual ApplicationsDeveloping Multilingual Applications
Developing Multilingual Applications
 
Open Solaris
Open SolarisOpen Solaris
Open Solaris
 
How to build Debian packages
How to build Debian packages How to build Debian packages
How to build Debian packages
 
AMANDA
AMANDAAMANDA
AMANDA
 
ASTERISK - Open Source PBS
ASTERISK - Open Source PBSASTERISK - Open Source PBS
ASTERISK - Open Source PBS
 
Applying Security Algorithms Using openSSL crypto library
Applying Security Algorithms Using openSSL crypto libraryApplying Security Algorithms Using openSSL crypto library
Applying Security Algorithms Using openSSL crypto library
 
Authentication Modules For Linux - PAM Architecture
Authentication Modules For Linux - PAM ArchitectureAuthentication Modules For Linux - PAM Architecture
Authentication Modules For Linux - PAM Architecture
 
Google Web toolkit
Google Web toolkitGoogle Web toolkit
Google Web toolkit
 
Debugging Applications with GNU Debugger
Debugging Applications with GNU DebuggerDebugging Applications with GNU Debugger
Debugging Applications with GNU Debugger
 
Storage Management using LVM
Storage Management using LVMStorage Management using LVM
Storage Management using LVM
 
Linux Kernel Development
Linux Kernel DevelopmentLinux Kernel Development
Linux Kernel Development
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

C Types - Extending Python

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. How does it work? import ctypes import your library prepare parameters call the (next) function
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.