• Complain

Philip Herron - Learning Cython Programming

Here you can read online Philip Herron - Learning Cython Programming full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2013, publisher: Packt Publishing, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Philip Herron Learning Cython Programming
  • Book:
    Learning Cython Programming
  • Author:
  • Publisher:
    Packt Publishing
  • Genre:
  • Year:
    2013
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Learning Cython Programming: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Learning Cython Programming" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Expand your existing legacy applications in C using Python

Overview

  • Extend C applications with pure Python code
  • Expand low-level C open source projects with pure Python Tmux
  • Get the most out of highly computational Python code using Cython
  • Integrate your C applications with Python Distutils and Automake/Autoconf

In Detail

Cython is a very powerful combination of Python and C. Using Cython, you can write Python code that calls back and forth from and to C or C++ code natively at any point. It is a language with extra syntax allowing for optional static type declarations. It is also a very popular language as it can be used for multicore programming.

Learning Cython Programming will provide you with a detailed guide to extending your native applications in pure Python; imagine embedding a twisted web server into your native application with pure Python code. You will also learn how to get your new applications up and running by reusing Pythons extensive libraries such as Logging and Config Parser to name a few.

With Learning Cython Programming, you will learn that writing your own Python module in C from scratch is not only hard, but is also unsafe. Cython will automatically handle all type-conversion issues as well as garbage collection on your code. You can also still write all your code in Python but have it compiled and called directly in C as if it was just another function or data.

This book also demonstrates how you can take the open source project Tmux and extend it to add new commands directly in pure Python. With this book, you will learn everything you need to know to get up and running with Cython and how you can reuse examples in a practical way.

What you will learn from this book

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

Approach

A practical and a fast-paced guide that gives you all the information you need to start programming using Cython.

Who this book is written for

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 show you how you can get new applications off the ground by reusing Python libraries to get started.

Philip Herron: author's other books


Who wrote Learning Cython Programming? Find out the surname, the name of the author of the book and a list of all author's works by series.

Learning Cython Programming — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Learning Cython Programming" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Learning Cython Programming

Learning Cython Programming

Copyright 2013 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: September 2013

Production Reference: 1190913

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78328-079-7

www.packtpub.com

Cover Image by Suresh Mogre (<>)

Credits

Author

Philip Herron

Reviewers

Namit Kewat

Goran Milovanovic

Acquisition Editor

Antony Lowe

Commissioning Editor

Mohammed Fahad

Technical Editor

Hardik B. Soni

Copy Editors

Sayanee Mukherjee

Aditya Nair

Kirti Pai

Adithi Shetty

Project Coordinator

Romal Karani

Proofreader

Paul Hindle

Indexers

Mehreen Deshmukh

Rekha Nair

Graphics

Sheetal Atule

Production Coordinator

Kirtee Shingan

Cover Work

Kirtee Shingan

About the Author

Philip Herron is an avid software engineer who focuses his passion towards 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 optimization of dynamic languages to develop a proof of concept GCC frontend to compile Python. This project sparked his deep interest of how Python works.

After completing a consecutive year on the same project in 2011, Philip decided to apply for 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 to add more high-level interfaces such as embedding Twisted web servers for REST calls to a system-level piece of software without writing any C code.

Currently Philip is employed by NYSE Euronext in Belfast Northern Ireland, working on multiprocessing systems. But he spends his evenings hacking on GCCPy, Cython, and GCC. In the past, he has worked with WANdisco as an Apache Hadoop developer and as an intern with SAP Research on cloud computing.

To achieve this book, I would like to thank many people. Firstly, my girlfriend Kirsty Johnston for putting up with my late nights and giving me the confidence I needed; you're the best! My mum and dad, Trevor and Ann Herron, who have always supported me my whole life; thanks for helping me so much.

I feel that Ian Lance Taylor from my GCC Google Summer of Code experience deserves a special mention; if it wasn't for you, I wouldn't be writing anything like this right now; you have shown me how to write software. Robert Bradshaw for mentoring my Cython GCC-PXD project even though I had a lot going on at the time; you helped me get it done and passed; you taught me how to manage time.

Special thanks Nicholas Marriott for helping me with the Tmux code base! I would also like to thank Gordon Hamilton, Trevor Lorimer, Trevor Thompson, and Dr Colin Turner for the support you've all given me.

About the Reviewers

Namit Kewat is a financial analyst and XBRL expert. At his job, he has worked on almost all the major SEC filers' XBRL creation (for example, BAC, GS, FB, and WSH). He is using Python extensively for extracting and generating reports from financial information present in XBRL financial reports. He has made a few quality checking apps in Python that are extensively used by his company for quality checks, which reduces the quality-check time from hours to seconds.

Goran Milovanovic is a Python programmer from the Blender Game Engine community. His interests include real-time simulation, nanotechnology, and education. If he is well known, it would be for his video tutorials, which can be found by Googling for "Goran's Python tutorial series".

I would like to thank my mother and father for their continuing support and encouragement.

www.PacktPub.com
Support files, eBooks, discount offers and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at > for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

httpPacktLibPacktPubcom Do you need instant solutions to your IT - photo 1

http://PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.

Why Subscribe?
  • Fully searchable across every book published by Packt
  • Copy and paste, print and bookmark content
  • On demand and accessible via web browser
Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.

Preface

Cython is a tool that makes writing C extensions to Python as easy as writing Python itself. This is the slogan to which Cython conforms. For those who don't know what I am talking about, writing C extensions to Python from scratch is a fairly difficult process; unless you really understand the Python-C API fully with respect to GIL and garbage collection as well as managing your own reference counting, it's a very difficult process.

I tend to consider Cython to be along these lines: what Jython is to Java and Python, Cython is to C/C++ and Python. It allows us to extend and develop bindings to applications in a really intuitive manner so that we are able to reuse code from levels of the software stack. The Cython compiler compiles the Cython language or even pure Python to a native C Python module, which can be loaded like any Python module via the normal import. It not only generates all the wrapper and boilerplate code, but also commands the Python garbage collector to add all the necessary reference counting code.

What's interesting with the Cython language is that it has native support for understanding C types and is able to juggle them from both languages. It's simply an extension of Python that has additional keywords and some more constructs and which allows you to call into C or Python.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Learning Cython Programming»

Look at similar books to Learning Cython Programming. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Learning Cython Programming»

Discussion, reviews of the book Learning Cython Programming and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.