How do you know if you're out of memory?

Erik Max Francis max at
Fri Jan 31 05:44:10 CET 2003

"R. C. Ellis" wrote:

> Anyway, how do I know if a new Tkinter widget I create has enough
> memory
> to instantiate?  I'd rather catch an exception or something, rather
> than
>   gift my user with a wonderful interpreter message.

There's a MemoryError which gets thrown for this purpose.

 Erik Max Francis / max at /
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ The great artist is the simplifier.
\__/ Henri Amiel
    Sade Deluxe /
 The ultimate Sade encyclopedia.

More information about the Python-list mailing list