Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #21827 > unrolled thread
| Started by | Christian Heimes <lists@cheimes.de> |
|---|---|
| First post | 2012-03-17 19:18 +0100 |
| Last post | 2012-03-17 19:18 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: urllib.urlretrieve never returns??? Christian Heimes <lists@cheimes.de> - 2012-03-17 19:18 +0100
| From | Christian Heimes <lists@cheimes.de> |
|---|---|
| Date | 2012-03-17 19:18 +0100 |
| Subject | Re: urllib.urlretrieve never returns??? |
| Message-ID | <mailman.763.1332008322.3037.python-list@python.org> |
Am 17.03.2012 15:13, schrieb Laszlo Nagy: > 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! The pythonw.exe may not have the rights to access network resources. Have you set a default timeout for sockets? import socket socket.setdefaulttimeout(10) # 10 seconds A pyw Python doesn't have stdout, stderr or stdin. Any attempt to write to them (e.g. print statement, default exception logger) can cause an exception. Christian
Back to top | Article view | comp.lang.python
csiph-web