strange behaviour when writing a large amount of data on stdout

Manlio Perillo NOmanlio_perilloSPAM at libero.it
Wed Nov 23 11:48:40 EST 2005


On Wed, 23 Nov 2005 14:59:45 +0100, "Fredrik Lundh"
<fredrik at pythonware.com> wrote:

>Manlio Perillo wrote:
>
>> Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)]
>> on win32, Windows XP
>>
>> I have this problem:
>>
>>>>> n = 61409 + 1
>>>>> data = 'x' * n
>>
>>>>> print data
>>
>> Traceback (most recent call last):
>>  File "xxx", line xxx, in ?
>>    print data
>> IOError: [Errno 12] Not enough space
>
>errno 12 is ENOMEM (that is, the system did not have enough memory
>to finish an operation).
>

...

However I think the error message is not a good one.
Better a "Not enough memory"

>is the above a complete interpreter session?  if it is, why did you xxx out
>the filename (<stdin>) and line number?
>

I put these instructions in a script and executed it (from the
console).

The same problem with a complete interpreter session.



Regards  Manlio Perillo




More information about the Python-list mailing list