logo资料库

Learning Cython Programming(2nd) 无水印pdf.pdf

第1页 / 共229页
第2页 / 共229页
第3页 / 共229页
第4页 / 共229页
第5页 / 共229页
第6页 / 共229页
第7页 / 共229页
第8页 / 共229页
资料共229页,剩余部分请下载后查看
Cover
Table of Contents
About the Author
Preface
1. Cython Won't Bite
Installing Cython
Emacs mode
Getting the code examples
Getting started – Hello World
Using distutils with Cython
Calling C functions from Python
Type conversion in Cython
Summary
2. Understanding Cython
Linking models
Cython keyword – cdef
Structs
Enums
Typedef and function pointers
The public keyword
Keyword cpdef
Logging from C/C++ into Python
Using Python ConfigParser from C/C++
Callbacks from Python to C/C++
Cython PXD
Integration with build systems
Python Distutils
GNU/Autotools
Summary
3. Extending Applications
Cython pure Python code
Compiling pure Python code
Avoid Makefiles – pyximport
Python garbage collector
Extending Tmux
Tmux build system
Embedding Python
Cythonizing struct cmd_entry
Implementing a Tmux command
Hooking everything together
Summary
4. Debugging Cython
Using GDB with Cython
Running cygdb
Cython caveats
Type checking
Dereference operator (*)
Python exceptions
C/C++ iterators
Boolean error
Const keyword
Multiple Cython inputs
Struct initialization
Calling into pure Python modules
Summary
5. Advanced Cython
Cython and C++
Namespaces
Classes
C++ new and del keyword
Exceptions
Bool type
Overloading
Templates
Static class member attribute
Calling C++ functions – Caveat
Namespaces – Caveat
Python distutils
Python threading and GIL
Atomic instructions
Read/write lock
Cython keywords
Messaging server
Caveat on GIL
Unit testing the native code
Preventing subclassing
Parsing large amounts of data
Summary
6. Further Reading
Overview
OpenMP support
Compile time preprocessor
Python 3
PyPy
AutoPXD
Pyrex and Cython
SWIG and Cython
Cython and NumPy
Numba versus Cython
Parakeet and Numba
Relevant Links
Summary
Index
Learning Cython Programming Second Edition
Table of Contents Learning Cython Programming Second Edition Credits About the Author Acknowledgments About the Reviewer www.PacktPub.com eBooks, discount offers, and more Why subscribe? Preface What this book covers What you need for this book Who this book is for Conventions Reader feedback Customer support Downloading the example code Errata Piracy Questions 1. Cython Won’t Bite Installing Cython Emacs mode Getting the code examples Getting started – Hello World Using distutils with Cython Calling C functions from Python Type conversion in Cython Summary 2. Understanding Cython
Linking models Cython keyword – cdef Structs Enums Typedef and function pointers The public keyword Keyword cpdef Logging from C/C++ into Python Using Python ConfigParser from C/C++ Callbacks from Python to C/C++ Cython PXD Integration with build systems Python Distutils GNU/Autotools Summary 3. Extending Applications Cython pure Python code Compiling pure Python code Avoid Makefiles – pyximport Python garbage collector Extending Tmux Tmux build system Embedding Python Cythonizing struct cmd_entry Implementing a Tmux command Hooking everything together Summary 4. Debugging Cython Using GDB with Cython Running cygdb Cython caveats
Type checking Dereference operator (*) Python exceptions C/C++ iterators Boolean error Const keyword Multiple Cython inputs Struct initialization Calling into pure Python modules Summary 5. Advanced Cython Cython and C++ Namespaces Classes C++ new and del keyword Exceptions Bool type Overloading Templates Static class member attribute Calling C++ functions – Caveat Namespaces – Caveat Python distutils Python threading and GIL Atomic instructions Read/write lock Cython keywords Messaging server Caveat on GIL Unit testing the native code Preventing subclassing
Parsing large amounts of data Summary 6. Further Reading Overview OpenMP support Compile time preprocessor Python 3 PyPy AutoPXD Pyrex and Cython SWIG and Cython Cython and NumPy Numba versus Cython Parakeet and Numba Relevant Links Summary Index
分享到:
收藏