Hi Daryl,

On Tue, Jun 28, 2011 at 3:44 AM, Daryl Tester <dt-py2exe@handcraftedcomputers.com.au> wrote:
On 27/06/11 20:52, Jonathan Morgan wrote:

> (see http://pypi.python.org/pypi/faulthandler/).
> The reason why is that faulthandler
> uses the fileno() method on standard input or standard output, and this
> doesn't exist in the dummy file handlers installed by py2exe.

I'd just be guessing (as I don't use this library), but to quote from
the front page of the URL above - "Start your graphical applications
in a terminal and run your server in foreground to see the traceback,
or pass a file to faulthandler.enable()."  Further down the page it
gives some info on the parameters passed to enable().

You are correct about that (I hadn't looked back at the page since including it a couple of months ago).  However, I was wanting to use stderr for the log so that Py2exe would automatically catch it and write to the standard Py2exe error log.  Otherwise I presumably have to add similar log writing functionality to what Py2exe has (which I know checks permissions and does a few other things).  Is there any problem with the Py2exe stderr having a fileno()?  Is it just because it is a dummy file and so it doesn't make sense having a fileno()?