PacktLib: Learning Cython Programming

Learning Cython Programming

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Cython Won't Bite

What this book is

What this book isn't

Installing Cython

Hello World

Module on your own

Summary

Understanding Cython

Cython cdef

Python ConfigParser

Cython cdef syntax and usage reference

Typedef and function pointers

Scalable asynchronous servers

C sockets with libevent

Integration with build systems

Summary

Extending Applications

Cython pure Python code

Python bindings

Python garbage collector

Extending Tmux

Embedding Python

Cythonizing struct cmd_entry

Implementing a Tmux command

Hooking everything together

Compiling pure Python code

Summary

Debugging Cython

Using GDB on your code

General Cython caveats

Calling into pure Python modules

Summary

Advanced Cython

C++ constructs

Caveat on C++ usage

Python threading and GIL

More inspiration

Parsing large amounts of data

Summary

Further Reading

Keyword cpdef

OpenMP support

Object initialization

Compile time

Python 3

Summary

Index