Am 20.10.2010 14:32, schrieb Justin Ezequiel: > On Oct 20, 12:47 am, Johannes Bauer <dfnsonfsdu...@gmx.de> wrote: >> >>>>> from urllib import request; request.URLopener().open("http://google.de") > > aren't you supposed to call read on the return value of open? > i.e., > request.URLopener().open("http://google.de").read()
If open blocks, a appended "read()" will never be executed. In order to demonstrate the problem, I reduced the call to the least amount of code needed to trigger it. Had I appended read(), it would not have been clear if the read() actually hangs or the open(). The way I posted it, it is clear. Regards, Johannes -- >> Wo hattest Du das Beben nochmal GENAU vorhergesagt? > Zumindest nicht öffentlich! Ah, der neueste und bis heute genialste Streich unsere großen Kosmologen: Die Geheim-Vorhersage. - Karl Kaos über Rüdiger Thomas in dsa <hidbv3$om...@speranza.aioe.org> -- http://mail.python.org/mailman/listinfo/python-list