How to catch an memory error in Windows?

2011-07-25 Thread António Rocha
Greetings

I'm using subprocess module to run an external Windows binary. Due to some
limitations, sometimes all memory is consumed in this process. How can I
catch this error?
Antonio
-- 
http://mail.python.org/mailman/listinfo/python-list


Re:How to catch an memory error in Windows?

2011-07-25 Thread António Rocha
Hi
I just want to use the Python part to catch this event as an error
try:
 subprocess
except ERROR:

I just wanted to know if there is any special error that I can use to catch
this error?
THanks
-- Forwarded message --
From: Thomas Jollans t...@jollybox.de
To: python-list@python.org
Date: Mon, 25 Jul 2011 17:14:46 +0200
Subject: Re: How to catch an memory error in Windows?
On 25/07/11 16:55, António Rocha wrote:
 Greetings

 I'm using subprocess module to run an external Windows binary. Due to
 some limitations, sometimes all memory is consumed in this process. How
 can I catch this error?
 Antonio


How is this relevant to the Python part?

Also, no memory left is not necessarily an error, it's simply a fact
of life. How to catch it depends on how you're (here, you means the
external process) allocating the memory - The POSIX C malloc function
will return NULL and set errno to ENOMEM, for example.

Thomas
-- 
http://mail.python.org/mailman/listinfo/python-list


Question- Getting Windows 64bits information Python 32bits

2011-07-07 Thread António Rocha
Greetings

I'm running Python (32b) in Windows7 (at 64bits) and I would like to know
how can I check if my machine is a 32b or 64b in Python. Is it possible? I
saw a few examples (like platform) but they only provide information about
Python not the machine.
Thanks
Toze
-- 
http://mail.python.org/mailman/listinfo/python-list