urllib.urlretrieve never returns???
Laszlo Nagy
gandalf at shopzeus.com
Sat Mar 17 10:13:16 EDT 2012
See attached example code. I have a program that calls exactly the same
code, and here is the strange thing about it:
* Program is started as "start.py", e.g. with an open console. In this
case, the program works!
* Program is started as "start.pyw", e.g. with no open console under
Windows 7 64bit - the program does not work!
In the later case, "log.txt" only contains "#1" and nothing else. If I
look at pythonw.exe from task manager, then its shows +1 thread every
time I click the button, and "#1" is appended to the file.
Seems like urllib.urlretrieve() does not return at all!
Using wx.PySimpleApp(redirect=True) does not help either - nothing is
printed on the redirected console.
Unfortunately, I cannot send the whole program, because it is too big
and also because it is confidental.
Question is: how is it possible that urllib.urlretrieve() does not
return? It is part of a system library. What I could have possibly done
to screw it up? And moreover, how is it possible that it does not return
ONLY when the program is started with pythonw.exe?
Thanks,
Laszlo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120317/bf559ca5/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.py
URL: <http://mail.python.org/pipermail/python-list/attachments/20120317/bf559ca5/attachment.ksh>
More information about the Python-list
mailing list