how to run in xp?

David Robinow drobinow at gmail.com
Wed Sep 28 12:17:05 EDT 2011


On Wed, Sep 28, 2011 at 9:29 AM, Peter Otten <__peter__ at web.de> wrote:
> =?gbk?B?ytjW6rT9zcM=?= wrote:
>
>> it can run ,but there is still a problem ,nothing in my file.
>> please run the code in xp+python32
>> import urllib.request, urllib.parse, urllib.error
>> exchange=['NASDAQ','NYSE','AMEX']
>> for down in exchange:
>>     url='http://www.nasdaq.com/screening/companies-by-
> industry.aspx?exchange='+down+'&render=download'
>>     file=urllib.request.urlopen(url).read()
>>     print (file)
>> what you get is:
>>
>>>>>
>> b''
>> b''
>> b''
>>>>>
>>
>> how to fix it?
>
> I get the expected output, but I'm on Linux. Are you using the latest bugfix
> release (Python 3.2.2)? Can you download the data with your browser?
I get the expected output, but I'm on Windows (Vista, Python 3.2.2.)



More information about the Python-list mailing list