15.04.2013 Views

Core Python Programming (2nd Edition)

Core Python Programming (2nd Edition)

Core Python Programming (2nd Edition)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 22. Extending <strong>Python</strong><br />

Chapter Topics<br />

● Introduction/Motivation<br />

● Extending <strong>Python</strong><br />

❍ Create Application Code<br />

❍ Wrap Code in Boilerplate<br />

❍ Compile<br />

❍ Import and Test<br />

❍ Reference Counting<br />

❍ Threading and the GIL<br />

● Related Topics<br />

In this chapter, we will discuss how to take code written externally and integrate that functionality into<br />

the <strong>Python</strong> programming environment. We will first give you motivation for doing this, then take you<br />

through the step-by-step process on how to do it. We should point out, though, that because extensions<br />

are primarily done in the C language, all of the example code you will see in this section is pure C but is<br />

easily portable to C++.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!