Learning Cython Programming.
A practical and a fast-paced guide that gives you all the information you need to start programming using Cython. This book is for developers who love C/C++ for low latency and speed but who also require the ability to add more dynamic features to applications both fast and reliably. It will also sh...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Packt Publishing,
2013.
|
Temas: | |
Acceso en línea: | Texto completo |
Tabla de Contenidos:
- Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Cython Won't Bite; What this book is; What this book isn't; Installing Cython; The emacs mode; Getting the code examples; Hello World; Module on your own; Calling into your C code; Type conversion; Summary; Chapter 2: Understanding Cython; Cython cdef; Linking models; The public keyword; Logging into Python; Python ConfigParser; Cython cdef syntax and usage reference; Structs; Enums; Typedef and function pointers; Scalable asynchronous servers; C sockets with libevent.
- What is libevent?Messaging engine; Cython callbacks; Cython PXD; Python messaging engine; Integration with build systems; Python distutils; GNU/Autotools; Summary; Chapter 3: Extending Applications; Cython pure Python code; Python bindings; Python garbage collector; Extending Tmux; Tmux build system; Embedding Python; Cythonizing struct cmd_entry; Implementing a Tmux command; Hooking everything together; Compiling pure Python code; Summary; Chapter 4: Debugging Cython; Using GDB on your code; Running cygdb; General Cython caveats; Type checking; No * operator; Python exceptions in C.
- For loops on C typesBool type; No C const; Multiple Cython files; Initializing struct; Calling into pure Python modules; Keeping call stacks small and pure; Summary; Chapter 5: Advanced Cython; C++ constructs; Namespaces; Classes; C++ new keyword and allocation; Exceptions; Bool type; Overloading; Templates; Static class member attribute; Caveat on C++ usage; Calling in C and C++ functions; Namespaces; Python distutils; Python threading and GIL; Atomic instructions; Read/write lock; Cython keywords; Messaging server revisited; More inspiration; Messaging server working with SQL.
- Python IRC notifierUnit testing the native code; Preventing subclassing; Cython typing via annotations; Parsing large amounts of data; Summary; Chapter 6: Further Reading; Keyword cpdef; OpenMP support; Object initialization; Compile time; Python 3; Using PyPy; AutoPXD; Pyrex versus Cython; SWIG versus Cython; Cython and NumPy; Numba versus Cython; Parakeet and Numba; Links and further reading; Summary; Index.