Howdy mates, Im running Python 2.6.4 in Ubuntu 9.10 with mod_python. When I run the following code in python IDLE -
urlretrieve(' http://www.pics4news.com/Eveant_Gallery/2008-09-06/Onam_Festival/Medium_Images/Onam_Festival_9834_medium.jpg ','/home/anirudh/onam.jpg') its works and give me the following output - ('/home/anirudh/onam.jpg', <httplib.HTTPMessage instance at 0x9a681ec>) Now when the same code is put in a file, say "leech.py" and is called from a html page called html1.py, I get the following error report - File "/home/anirudh/server/mod/tb/leech.py", line 51, in index urlretrieve(' http://www.pics4news.com/Eveant_Gallery/2008-09-06/Onam_Festival/Medium_Images/Onam_Festival_9834_medium.jpg ','/home/anirudh/onam2.jpg') File "/usr/lib/python2.6/urllib.py", line 94, in urlretrieve return _urlopener.retrieve(url, filename, reporthook, data) File "/usr/lib/python2.6/urllib.py", line 242, in retrieve tfp = open(filename, 'wb') IOError: [Errno 13] Permission denied: '/home/anirudh/onam2.jpg' I tried with different name for the target file so that there will be no problen of replaceing the file. Got any idea whats going on guys? -- Cheers, Anirudh Asokan www.anirudh.ind.in _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers