]> granicus.if.org Git - python/commitdiff
Brought up to date with the current state of affairs.
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 8 Oct 2001 15:32:17 +0000 (15:32 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 8 Oct 2001 15:32:17 +0000 (15:32 +0000)
Mac/Demo/embed/demo.c
Mac/Demo/embed/embeddemo.prj

index a23c249b05065b37e7c5ea3e21ed02d4090bd8e9..7d450f165f365189fcd042ce3e82bea398c406d0 100644 (file)
@@ -3,7 +3,6 @@
 #include "Python.h"
 #ifdef macintosh
 #include "macglue.h"
-#include <SIOUX.h>
 #endif /* macintosh */
 
 static char *argv0;
@@ -21,6 +20,12 @@ main(argc, argv)
 
        /* Initialize the Python interpreter.  Required. */
 #ifdef macintosh
+       /* If the first option is "-q" we don't open a console */
+       if ( argc > 1 && strcmp(argv[1], "-q") == 0 ) {
+               PyMac_SetConsoleHandler(PyMac_DummyReadHandler, PyMac_DummyWriteHandler,
+                       PyMac_DummyWriteHandler);
+/*             freopen("demo output", "w", stdout); */
+       }
        PyMac_Initialize();
 #else
        Py_Initialize();
@@ -45,10 +50,6 @@ main(argc, argv)
 
        /* Some more application specific code */
        printf("\nGoodbye, cruel world\n");
-#ifdef macintosh
-       printf("Type return or so-\n");
-       getchar();
-#endif
        /* Exit, cleaning up the interpreter */
        Py_Exit(0);
        /*NOTREACHED*/
index 8bcb272697f1c5010583b4e40773883881c9bfe2..e519b5c8fa86b56eb20c56beb9594fa904d6b2e3 100644 (file)
Binary files a/Mac/Demo/embed/embeddemo.prj and b/Mac/Demo/embed/embeddemo.prj differ