summaryrefslogtreecommitdiffstats
path: root/Mac/Modules
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-10-19 22:02:16 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2000-10-19 22:02:16 (GMT)
commit8413b47ba78c0d98f4310d2d62bb0d88ecb96a53 (patch)
treef17059bae8c1ff2e620c6273c74377622ff655b7 /Mac/Modules
parentf1a0a4be630c16e287578977627225b05b9c7292 (diff)
downloadcpython-8413b47ba78c0d98f4310d2d62bb0d88ecb96a53.zip
cpython-8413b47ba78c0d98f4310d2d62bb0d88ecb96a53.tar.gz
cpython-8413b47ba78c0d98f4310d2d62bb0d88ecb96a53.tar.bz2
Added PyMac_OutputSeen(), which acknowledges all current output in the stdio window, i.e. it acts like input has been read insofar as the keep-console-open option is interested.
Diffstat (limited to 'Mac/Modules')
-rw-r--r--Mac/Modules/macosmodule.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c
index 339de1a..b3dec54 100644
--- a/Mac/Modules/macosmodule.c
+++ b/Mac/Modules/macosmodule.c
@@ -691,6 +691,18 @@ MacOS_KeepConsole(PyObject *self, PyObject *args)
return Py_None;
}
+static char OutputSeen_doc[] = "Call to reset the 'unseen output' flag for the keep-console-open option";
+
+static PyObject *
+MacOS_OutputSeen(PyObject *self, PyObject *args)
+{
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ PyMac_OutputSeen();
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
static PyMethodDef MacOS_Methods[] = {
#if !TARGET_API_MAC_CARBON
{"AcceptHighLevelEvent", MacOS_AcceptHighLevelEvent, 1, accepthle_doc},
@@ -711,6 +723,7 @@ static PyMethodDef MacOS_Methods[] = {
{"MaxBlock", MacOS_MaxBlock, 1, MaxBlock_doc},
{"CompactMem", MacOS_CompactMem, 1, CompactMem_doc},
{"KeepConsole", MacOS_KeepConsole, 1, KeepConsole_doc},
+ {"OutputSeen", MacOS_OutputSeen, 1, OutputSeen_doc},
{NULL, NULL} /* Sentinel */
};