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

Giorgio Brajnik giorgio@dimi.uniud.it
Wed, 22 Dec 1999 18:06:01 +0100 (MET)


Hi there.
I've got this problem when building an application that embeds python.

My C++ program calls PyMac_Initialize(), and as a result of this a
blank console window is opened. How should I do to get rid of it at
the very beginning?
Some pythonmac documentation says:

Embedding Python on the mac is pretty similar to embedding it on other
platforms, but a few points need mentioning:

       You call PyMac_Initialize() in stead of Py_Initialize(). The
       prototype is in macglue.h. This call initializes the toolbox,
       GUSI (if needed),
       sets up the correct resource files and calls Py_Initialize.
       You have to be consequent in your use of GUSI. If the library
       uses it so should your program and vice versa.
       The console-behaviour (close-on-exit, etc) is controlled by
       Python, but you are of course free to change that after calling
       PyMac_Initialize().

and it is precisely this latter thing that I want to do. How?

Thanks a lot
               Giorgio Brajnik
______________________________________________________________________
Dip. di Matematica e Informatica   | voice: +39 (0432) 55.8445
Universita` di Udine               | fax:   +39 (0432) 55.8499
Via delle Scienze, 206             | email: giorgio@dimi.uniud.it
Loc. Rizzi -- 33100 Udine -- ITALY | http://www.dimi.uniud.it/~giorgio