You can httpdapi.RequestHandler.build_cgi_env(), which returns a dictionary. if you want to turn these into real environment variables, you can just loop over the returned dict and stuff them into the os.environ dictionary. -- erno