Learning Cython Programming, 2/e(Paperback)

Philip Herron

  • 出版商: Packt Publishing
  • 出版日期: 2016-02-23
  • 售價: $1,640
  • 貴賓價: 9.5$1,558
  • 語言: 英文
  • 頁數: 110
  • 裝訂: Paperback
  • ISBN: 1783551674
  • ISBN-13: 9781783551675
  • 相關分類: C 程式語言Python程式語言
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

相關主題

商品描述

Key Features

  • Learn how to extend C applications with pure Python code
  • Get more from Python – you'll not only learn Cython, you'll also unlock a greater understanding of how to harness Python
  • Packed 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!

Book Description

Cython 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.

What you will learn

  • Reuse Python logging in C
  • Make an IRC bot out of your C application
  • Extend an application so you have a web server for rest calls
  • Practice Cython against your C++ code
  • Discover tricks to work with Python ConfigParser in C
  • Create Python bindings for native libraries
  • Find out about threading and concurrency related to GIL
  • Expand Terminal Multiplexer Tmux with Cython

About the Author

Philip Herron is a developer who focuses his passion toward compilers and virtual machine implementations. When he was first accepted to Google Summer of Code 2010, he used inspiration from Paul Biggar's PhD on the optimization of dynamic languages to develop a proof of the concept GCC frontend to compile Python. This project sparked his deep interest in how Python works.

After completing a consecutive year on the same project in 2011, Philip applied to Cython under the Python foundation to gain a deeper appreciation of the standard Python implementation. Through this he started leveraging the advantages of Python to control the logic in systems or even add more high-level interfaces, such as embedding Flask web servers in a REST API to a system-level piece of software, without writing any C code.

Philip currently works as a software consultant for Instil Software based in Northern Ireland. He develops mobile applications with embedded native code for video streaming. Instil has given him a lot of support in becoming a better engineer.

He has written several tutorials for the UK-based Linux Format magazine on Python and loves to share his passion for the Python programming language.

Table of Contents

  1. Cython Won't Bite
  2. Understanding Cython
  3. Extending Applications
  4. Debugging Cython
  5. Advanced Cython
  6. Further Reading

商品描述(中文翻譯)

主要特點



  • 學習如何使用純Python代碼擴展C應用程序

  • 更深入地了解Python - 您不僅將學習Cython,還將更好地掌握如何利用Python

  • 充滿技巧和訣竅,使Cython變得容易上手,深入探索這本易於理解的編程指南,了解當C和Python結合在一起時會發生什麼!

書籍描述


Cython是一種混合編程語言,用於為Python語言編寫C擴展。結合了Python的實用性和C語言的速度和易用性,如果您想輕鬆構建快速應用程序,這是一門值得學習的令人興奮的語言。


《學習Cython編程》的新版本將帶您入門,帶您了解基礎知識,讓您開始體驗其獨特的功能。


您將了解如何進行設置,然後探索Python和Cython之間的關係。您還將研究Cython的調試,然後轉向C++結構、C++使用的注意事項、Python線程和Cython中的GIL。最後,您將學習對象初始化和編譯時,並深入了解Python 3,這不僅將幫助您成為一名自信的Cython開發人員,還將使您成為一名更加流利的Python開發人員。

您將學到什麼



  • 在C中重用Python日誌記錄

  • 將C應用程序製作成IRC機器人

  • 擴展應用程序,使其成為REST調用的Web服務器

  • 使用Cython對抗您的C++代碼

  • 發現在C中使用Python ConfigParser的技巧

  • 為本地庫創建Python綁定

  • 了解與GIL相關的線程和並發

  • 通過Cython擴展Terminal多路復用器Tmux

關於作者


Philip Herron是一位專注於編譯器和虛擬機實現的開發人員。當他首次被接受參加2010年的Google Summer of Code時,他利用Paul Biggar關於動態語言優化的博士學位的靈感,開發了一個GCC前端的概念證明,用於編譯Python。這個項目引發了他對Python工作原理的濃厚興趣。


在2011年連續完成了同一個項目後,Philip申請加入Python基金會的Cython項目,以更深入地了解標準Python實現的價值。通過這一過程,他開始利用Python的優勢來控制系統中的邏輯,甚至添加更高級的接口,例如將Flask Web服務器嵌入到REST API中的系統級軟件,而無需編寫任何C代碼。


Philip目前在北愛爾蘭的Instil Software擔任軟件顧問。他開發帶有嵌入式本地代碼的移動應用程序,用於視頻流傳輸。Instil在成為一名更好的工程師方面給予了他很多支持。


他曾為英國的Linux Format雜誌撰寫了幾篇有關Python的教程,並熱衷於分享對Python編程語言的熱愛。

目錄



  1. Cython不會咬人

  2. 理解Cython

  3. 擴展應用程序

  4. 調試Cython

  5. 高級Cython

  6. 進一步閱讀