#include #include /***********************/ module functions */***********************static pyobject wrap_getenv(pyobject *selfpyobject *argschar *varname*varvaluepyobject *returnobj null/returns object */self not used */args from python */null=exception *if (pyarg_parse(args"( )"&varname)/python - *varvalue getenv(varname)/call getenv *if (varvalue !nullreturnobj py_buildvalue(" "varvalue)/ -python *else pyerr_setstring(pyexc_systemerror"error calling getenv")return returnobjstatic pyobject wrap_putenv(pyobject *selfpyobject *argschar *varname*varvalue*varassignpyobject *returnobj nullif (pyarg_parse(args"(ss)"&varname&varvalue)varassign malloc(strlen(varnamestrlen(varvalue )sprintf(varassign"% =% "varnamevarvalue)if (putenv(varassign= py_incref(py_none)/ call success *returnobj py_none/reference none *else pyerr_setstring(pyexc_systemerror"error calling putenv")return returnobj/**************************/ registration table */**************************static pymethoddef cenviron_methods[{"getenv"wrap_getenvmeth_varargs"getenv doc"}{"putenv"wrap_putenvmeth_varargs"putenv doc"}{nullnull null} python/ integration /name&func*/name&func*/end of table marker *