internallyas usual in developmentyou may have to barter with the makefile to get it to work on your system once you've run the makefilethoughyou are finished the generated module is used exactly like the manually coded version shown beforeexcept that swig has taken care of the complicated parts automatically function calls in our python code are routed through the generated swig layerto the code in example - and back againwith swigthis all "just works"/pp /integrate/extend/swigpython import hellowrap hellowrap message('swig world''helloswig worldimport glue library file cwd always searched on imports hellowrap __file__ 'hellowrap pydir(hellowrap['__builtins__''__doc__''__file__''__name__''_hellowrap''message'hellowrap _hellowrap in other wordsonce you learn how to use swigyou can often largely forget the details behind integration coding in factswig is so adept at generating python glue code that it' usually easier and less error prone to code extensions for python as purely cor ++-based libraries firstand later add them to python by running their header files through swigas demonstrated here we've mostly just scratched the swig surface hereand there' more for you to learn about it from its python-specific manual--available with swig at org although its examples in this book are simpleswig is powerful enough to integrate libraries as complex as windows extensions and commonly used graphics apis such as opengl we'll apply it again later in this and explore its "shadow classmodel for wrapping +classes too for nowlet' move on to more useful extension example wrapping environment calls our next example is extension module that integrates the standard library' getenv and putenv shell environment variable calls for use in python scripts example - is file that achieves this goal in hand-codedmanual fashion example - pp \integrate\extend\cenviron\cenviron /***************************************************************** extension module for pythoncalled "cenvironwraps the library' getenv/putenv routines for use in python programs ******************************************************************wrapping environment calls