summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-22 18:38:12 (GMT)
committerGuido van Rossum <guido@python.org>1995-01-22 18:38:12 (GMT)
commitc02311ba531b9a98a5e93113d7c91fec3857db0c (patch)
tree33aadd6a9421cfb9f34ffb2f271d64ef02308c8e
parentd8373d82fe5249d8fdca23856d0ba463670ce2c7 (diff)
downloadcpython-c02311ba531b9a98a5e93113d7c91fec3857db0c.zip
cpython-c02311ba531b9a98a5e93113d7c91fec3857db0c.tar.gz
cpython-c02311ba531b9a98a5e93113d7c91fec3857db0c.tar.bz2
added printf -- hack for Think C to init stdwin and stdio
-rw-r--r--Mac/Python/macmain.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/Mac/Python/macmain.c b/Mac/Python/macmain.c
index 63bd416..4bf193e 100644
--- a/Mac/Python/macmain.c
+++ b/Mac/Python/macmain.c
@@ -48,6 +48,22 @@ main(argc, argv)
char **argv;
{
#ifdef USE_STDWIN
+#ifdef THINK_C
+ /* This is done to initialize the Think console I/O library before stdwin.
+ If we don't do this, the console I/O library will only be usable for
+ output, and the interactive version of the interpreter will quit
+ immediately because it sees an EOF from stdin.
+ The disadvantage is that when using STDWIN, your stdwin menus will
+ appear next to the console I/O's File and Edit menus, and you will have
+ an empty console window in your application (though it can be removed
+ by clever use of console library I believe).
+ Remove this line if you want to be able to double-click Python scripts
+ that use STDWIN and never use stdin for input.
+ (A more dynamic solution may be possible e.g. based on bits in the
+ SIZE resource or whatever... Have fun, and let me know if you find
+ a better way!) */
+ printf("\n");
+#endif
/* Use STDWIN's wargs() to set argc/argv to list of files to open */
wargs(&argc, &argv);
/* Put About Python... in Apple menu */