Chapter 22. Extending Python


Chapter Topics

  • Introduction/Motivation

  • Extending Python

    • Create Application Code

    • Wrap Code in Boilerplate

    • Compile

    • Import and Test

    • Reference Counting

    • Threading and the GIL

  • Related Topics

In this chapter, we will discuss how to take code written externally and integrate that functionality into the Python programming environment. We will first give you motivation for doing this, then take you through the step-by-step process on how to do it. We should point out, though, that because extensions are primarily done in the C language, all of the example code you will see in this section is pure C but is easily portable to C++.



Core Python Programming
Core Python Programming (2nd Edition)
ISBN: 0132269937
EAN: 2147483647
Year: 2004
Pages: 334
Authors: Wesley J Chun

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net