Need help with cython-book?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

philberty
131 Stars 41 Forks 19 Commits 4 Opened issues

Description

Learning Cython packtpub.com code examples.

Services available

!
?

Need anything else?

Contributors list

# 58,681
static-an...
C
C++
CSS
f-stack 2.6K static-analysis top 100

+TITLE: README.org

+AUTHOR: Philip Herron

+EMAIL: [email protected]

+DATE: 2013-06-04 Tue

+DESCRIPTION:

+KEYWORDS:

+LANGUAGE: en

+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t

+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc

+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js

+EXPORTSELECTTAGS: export

+EXPORTEXCLUDETAGS: noexport

+LINK_UP:

+LINK_HOME:

+XSLT:

[[https://travis-ci.org/redbrain/cython-book.png?branch=master]]

  • Learning Cython README These are all the cython code examples used within the book for easy reference and for me to be able to maintain these in the future. To keep not only the book relevant but the code aswell.

Here are some useful links to relevant links that you would care about.

-Cython: http://www.cython.org/ -Cython Official Reference: http://docs.cython.org/ -Cython Wiki: http://wiki.cython.org/ -Special Thanks to: http://www.packtpub.com/ -Author Blog: http://redbrain.co.uk/

** Chapter 1 Intro Deals with just hello world and a simple walk through of your own module from scratch!

** Chatper 2 Cdef and mixing C/Python Here things get more interesting with reusing: - Python ConfigParser - Python logging To extend new C projects to get them up and running FAST

Then iterating over the cdef usage as a reference and the cython public keyword usage and how to handle the new header file.

*** Messaging Server Finally a fairly quick and hacky messaging server written in an hour in C and Cython using libevent over simple Sockets. Demonstrates how to get the most of cython to extend existing systems.

** Chapter 3 Cython Conventions There are 3 parts to this chapter firstly on how to use cython to generate Python'esque classes for your C/C++ types with respect to Memory Management.

*** Memory Such as the dealloc hook when python GC decides to delete your objects. As well as using malloc/sizeof etc from cython in the cinit and str hooks to make it really feel like just any normal python code.

*** Speed Using cython to simply compile your python code to get speed ups in number crunching in the primes example from cython compared to a plain nearly word for word match in pure python

*** Extending Tmux Extending existing Open Source projects using pure Cython instead of using C!

** Chapter 4 Caveats and Debugging This chapter deals with some caveats in Type Conversion you might come across and how to use cygdb on your code.

** Chapter 5 Advanced Cython Advanced topics with cython include using C++ with cython and how to interface with that. And a little intro on how to worry about the GIL releated to threading. And finally 2 more examples on how you could extend systems with cython.

** Chapter 6 Cython extra's Rounding off the book with a discussion on Python 3 and PyPy. And a quick look at the Auto PXD tools for cython that are available.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.