extending and embedding python ne of the most powerful features of python is its ability to interface with software written in there are two common strategies for integrating python with foreign code firstforeign functions can be packaged into python library module for use with the import statement such modules are known as extension modules because they extend the interpreter with additional functionality not written in python this isby farthe most common form of python- integration because it gives python applications access to high-performance programming libraries the other form of python- integration is embedding this is process by which python programs and the interpreter are accessed as library from this latter approach is sometimes used by programmers who want to embed the python interpreter into an existing application framework for some reason--usually as some kind of scripting engine this covers the absolute basics of the python- programming interface firstthe essential parts of the api used to build extension modules and embed the python interpreter are covered this section is not intended to be tutorialso readers new to this topic should consult the "embedding and extending the python interpreterdocument available at "python/ api reference manualavailable at ctypes library module is covered this is an extremely useful module that allows you to access functions in libraries without writing any additional code or using compiler it should be noted that for advanced extension and embedding applicationsmost programmers tend to turn to advanced code generators and programming libraries for examplethe swig project (extension modules by parsing the contents of header files references to this and other extension building tools can be found at integratingpythonwithotherlanguages extension modules this section outlines the basic process of creating handwritten extension module for python when you create an extension moduleyou are building an interface lib fl ff