Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
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 ...
ctypes History   1
Reasons to use ctypes more portable between implementations  of Python. It has a much lower startup cost. It is in Pyth...
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/1...
Upcoming SlideShare
Loading in …5
×

Ctypes

929 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Ctypes

  1. 1. a foreign function library for Python 交大資工系103級 戴嘉駿/darkgerm <darkgerm@gmail.com>
  2. 2. How can Python combine withC? Python API Python built-in module - ctypes third party module (ex: boost.python, SWIG)
  3. 3. What is ctypes A foreign function library for Python. It provides C compatible data types. It allows calling functions in DLLs or shared libraries.
  4. 4. ctypes History 1
  5. 5. 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!
  6. 6. Fundamenta data types
  7. 7. Structures and Unions
  8. 8. Example on stackoverflow
  9. 9. Example on stackoverflow
  10. 10. Example on stackoverflow
  11. 11. Example on stackoverflow
  12. 12. Example on stackoverflow
  13. 13. Example on stackoverflow
  14. 14. Example on stackoverflow
  15. 15. Modify the Example
  16. 16. Modify the Example
  17. 17. Modify the Example
  18. 18. Modify the Example
  19. 19. function prototypes
  20. 20. function prototypes
  21. 21. Who use ctypes?
  22. 22. Who use ctypes?
  23. 23. Who use ctypes?
  24. 24. 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/

×