[Pythonmac-SIG] [Q] how to disable stderr/stdout console?

Jack Jansen jack@oratrix.nl
Fri, 31 Dec 1999 16:21:48 +0100


Recently, Glenn Andreas <gandreas@visi.com> said:
> >I was already going to change this, by adding a do_init_toolbox
> >argument to PyMac_Initialize(), but then I remembered (or seem to
> >remember:-) that multiple toolbox initializations shouldn't do any
> >harm. And as PyMac_Initialize needs (some of) the toolboxes to be initialize
> d
> >the only option your program has is to initialize them earlier, in
> >which case the init_mac_world() call in PyMac_Initialize is a no-op.
> 
> Unless somebody wants to write a faceless background only application 
> that uses Python, since BOAs don't call all the toolbox init calls 
> (they don't call InitMenu() or InitWindow(), IIRC).

Ah... I experimented with FBAs in Python for a while, but I never got
them to work. This may be the reason why.

I think this could be fixed by splitting the toolbox init calls in two 
sets: one to be done always, at the same place where currently
everything is initialized, and one for the menu/window/etc init calls, 
to be done after reading the preferences but before popping the
optional startup dialog. That way we can add a (per-application)
preference flag "don't init windowing toolboxes", which could be set
for FBA's (or by programs using embedded Python).

I'll put it on my todo list, but it's low-priority, so if someone
wants it quick: please donate code.
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm