I changed the helloworld example to following:
helloworld.py
----------------------
import urllib
print 'Content-Type: text/plain'
print ''
print 'Hello, world!'
print urllib.urlopen('
http://xml.weather.yahoo.com/forecastrss?
p=95136').read()
If I run this file using python command line interpreter it works and
dump the xml file on the screen.
But when I run it using the google app server, it throws following
error.
-----------------------------------------------------------------------------------
F:\Python25\lib\urllib.py in __init__(self=<urllib.FancyURLopener
instance at 0x015E8BC0>, proxies={}, **x509={})
121 self.addheaders = [('User-Agent', self.version)]
122 self.__tempfiles = []
123 self.__unlink = os.unlink # See cleanup()
124 self.tempcache = None
125 # Undocumented feature: if you assign {} to tempcache,
self = <urllib.FancyURLopener instance at 0x015E8BC0>, self.__unlink
undefined, global os = <module 'os' from 'F:\Python25\lib\os.pyc'>,
os.unlink undefined
<type 'exceptions.AttributeError'>: 'module' object has no attribute
'unlink'
------------------------------------------------------------------------------------
Thanks.