def pollute(names, objects):
 from inspect import currentframe
 frame = currentframe().f_back.f_back
 try:
  for (name, obj) in zip(names, objects):
   frame.f_globals[name] = obj
 finally:
  del frame

def pollute ( names , objects ) : from inspect import currentframe frame = currentframe ( ) . f_back . f_back try : for ( name , obj ) in zip ( names , objects ) : frame . f_globals [ name ] = obj finally : del frame
pollute the global namespace with symbols -> objects mapping .