strange behaviour when writing a large amount of data on stdout
Fredrik Lundh
fredrik at pythonware.com
Wed Nov 23 12:18:34 EST 2005
Manlio Perillo wrote:
> >>>>> 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"
the message text is provided by the operating system (or rather, by
the C library). I'm not sure rewriting error messages is a good thing...
(if Python itself runs out of memory, it'll raise a MemoryError instead)
</F>
More information about the Python-list
mailing list