locals()

Returns a dictionary containing the current scopes local variables. See section 4.6 where it is used to modify the module name space from another module.