SlideShare una empresa de Scribd logo
1 de 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]

Más contenido relacionado

Destacado (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
 

Similar a 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
 

Similar a 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
 

Más de 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
 

Más de 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
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

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.