def teardown_environment():
 (oldenv, os.name, sys.platform, path.get_home_dir, IPython.__file__, old_wd) = oldstuff
 os.chdir(old_wd)
 reload(path)
 for key in list(env):
  if (key not in oldenv):
   del env[key]
 env.update(oldenv)
 if hasattr(sys, 'frozen'):
  del sys.frozen

def teardown_environment ( ) : ( oldenv , os . name , sys . platform , path . get_home_dir , IPython . __file__ , old_wd ) = oldstuff os . chdir ( old_wd ) reload ( path ) for key in list ( env ) : if ( key not in oldenv ) : del env [ key ] env . update ( oldenv ) if hasattr ( sys , 'frozen' ) : del sys . frozen
restore things that were remembered by the setup_environment function .