Get Free Shipping on orders over $79
Extending & Embedding Python Using C - Mike James

Extending & Embedding Python Using C

By: Mike James

Paperback | 30 September 2023

At a Glance

Paperback


$85.75

or 4 interest-free payments of $21.44 with

 or 

Ships in 15 to 25 business days

Writing a C extension for Python is good for fun and profit
The fun part is that adding Python to C gives you so much more power and a deeper understanding of how Python works. The internals of Python are worth knowing about because they suggest new approaches to other problems. As well as being interesting, it is also a valuable skill.

Extending & Embedding Python Using C tells you everything you need to know about the C API, which is what you use to create an extension. It is essentially the Python runtime and so exploring it tells you a lot about Python. You don't need to be an expert Python programmer to create an extension, but it helps. As you are going to be writing mostly C code, programming in C is a more important skill for this task. While you don't have to be a C expert, you do need to be reasonably competent and C aficionados will enjoy finding out about some of the clever techniques in use in the C API.

Extending Python is a way of bringing any C-based application or library to a much wider audience. Converting Python functions into C functions is also a way of speeding things up. Moreover, you can provide access to hardware or system features that are usually inaccessible by creating an extension. The final chapter explains how to convert the skills you have gained in creating a Python extension to embed Python in a C program. This is a less common requirement, but it has some interesting advantages and possibilities and once you know how to create a Python extension it is easy.

Mike James has a BSc in Physics, an MSc in Mathematics, a PhD in Computer Science and in a long career as a programmer he has mastered many programming languages. He is the founder and chief editor of I-Programmer, the online magazine written by programmers for programmers and the author of dozens of books. His previous three books on Python, Programmer's Python: Everything Is An Object, Programmer's Python: Everything Is Data and Programmer's Python: Async form a set of "Something Completely Different" books that look at what makes Python special and sets it apart from other programming languages. While not part of the series, this book shares the same overall philosophy.

More in Programming & Scripting Languages

The C Programming Language : Prentice Hall Software - Brian Kernighan

RRP $107.04

$75.75

29%
OFF
Python All-in-One For Dummies : 3rd Edition - Alan Simpson

RRP $74.95

$55.75

26%
OFF
Introduction to Programming Languages - Gordon Hurley
Typesetting Mathematics With Latex - Robert Legato
C# 12 in a Nutshell : The Definitive Reference - Joseph Albahari

RRP $133.00

$64.75

51%
OFF
PHP, MySQL, & JavaScript All-In-One For Dummies : For Dummies - Richard Blum
Programming Rust : Fast, Safe Systems Development 2nd Edition - Jason Orendorff
Learning Go : An Idiomatic Approach to Real-World Go Programming - Jon Bodner
C++ How to Program, Global Edition : 10th Edition - Paul Deitel

RRP $167.95

$133.75

20%
OFF
Python Cookbook : Recipes for Mastering Python : 3rd Edition - David Beazley