Ctypes
Upcoming SlideShare
Loading in...5
×
 

Ctypes

on

  • 732 views

 

Statistics

Views

Total Views
732
Views on SlideShare
732
Embed Views
0

Actions

Likes
0
Downloads
6
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Ctypes Ctypes Presentation Transcript

  • a foreign function library for Python 交大資工系103級 戴嘉駿/darkgerm <darkgerm@gmail.com>
  • How can Python combine withC? Python API Python built-in module - ctypes third party module (ex: boost.python, SWIG)
  • What is ctypes A foreign function library for Python. It provides C compatible data types. It allows calling functions in DLLs or shared libraries.
  • ctypes History 1
  • Reasons to use ctypes more portable between implementations of Python. It has a much lower startup cost. It is in Python Standard Library. youre still writing Python!
  • Fundamenta data types
  • Structures and Unions
  • Example on stackoverflow
  • Example on stackoverflow
  • Example on stackoverflow
  • Example on stackoverflow
  • Example on stackoverflow
  • Example on stackoverflow
  • Example on stackoverflow
  • Modify the Example
  • Modify the Example
  • Modify the Example
  • Modify the Example
  • function prototypes
  • function prototypes
  • Who use ctypes?
  • Who use ctypes?
  • Who use ctypes?
  • Thank you for listening!!Ref: http://docs.python.org/library/ctypes.html http://stackoverflow.com/questions/145270/calling-c-c-from-python http://stackoverflow.com/questions/135834/python-swig-vs-ctypes http://stackoverflow.com/questions/1942298/wrapping-a-c-library-in- python-c-cython-or-ctypes https://www.google.com/