万本电子书0元读

万本电子书0元读

顶部广告

Learning Cython Programming - Second Edition电子书

售       价:¥

25人正在读 | 0人评论 6.2

作       者:Philip Herron

出  版  社:Packt Publishing

出版时间:2016-02-22

字       数:25.9万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Learn the fundamentals of Cython to extend the legacy of your applicationsAbout This BookLearn how to extend C applications with pure Python codeGet more from Python – you’ll not only learn Cython, you’ll also unlock a greater understanding of how to harness PythonPacked with tips and tricks that make Cython look easy, dive into this accessible programming guide and find out what happens when you bring C and Python together!Who This Book Is ForThis book is for developers who are familiar with the basics of C and Python programming and wish to learn Cython programming to extend their applications.What You Will LearnReuse Python logging in CMake an IRC bot out of your C applicationExtend an application so you have a web server for rest callsPractice Cython against your C++ codeDiscover tricks to work with Python ConfigParser in CCreate Python bindings for native librariesFind out about threading and concurrency related to GILExpand Terminal Multiplexer Tmux with CythonIn DetailCython is a hybrid programming language used to write C extensions for Python language. Combining the practicality of Python and speed and ease of the C language it’s an exciting language worth learning if you want to build fast applications with ease.This new edition of Learning Cython Programming shows you how to get started, taking you through the fundamentals so you can begin to experience its unique powers.You’ll find out how to get set up, before exploring the relationship between Python and Cython. You’ll also look at debugging Cython, before moving on to C++ constructs, Caveat on C++ usage, Python threading and GIL in Cython. Finally, you’ll learn object initialization and compile time, and gain a deeper insight into Python 3, which will help you not only become a confident Cython developer, but a much more fluent Python developer too.Style and approachThis practical and a fast-paced guide gives you all the information you need to start programming using Cython.
目录展开

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

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部