some of these calls are made by linked-in codenot by pythoni changed user in the shell prior to this session with an export command)/pp /integrate/extend/cenvironpython import os os environ['user'initialized from the shell 'skipperfrom cenviron import getenvputenv direct library call access getenv('user''skipperputenv('user''gilligan'changes for but not python getenv('user''gilliganos environ['user'oops--does not fetch values again 'skipperos getenv('user'ditto 'skipperadding wrapper classes to flat libraries as isthe extension module exports function-based interfacebut it' easy to wrap its functions in python code that makes the interface look any way you like for instanceexample - makes the functions accessible by dictionary indexing and integrates with the os environ object--it guarantees that the object will stay in sync with fetches and changes made by calling our extension functions example - pp \integrate\extend\cenviron\envmap py import os from cenviron import getenvputenv class envmappingdef __setitem__(selfkeyvalue)os environ[keyvalue putenv(keyvaluedef __getitem__(selfkey)value getenv(keyos environ[keyvalue return value env envmapping(get module' methods wrap in python class on writesenv[key]=value put in os environ too on readsenv[keyintegrity check make one instance to use this moduleclients may import its env object using env['var'dictionary syntax to refer to environment variables example - goes step further and exports the functions as qualified attribute names rather than as calls or keys--variables are referenced with env var attribute syntax wrapping environment calls