Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b19c667d
Commit
b19c667d
authored
Oct 12, 2000
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a method KeepConsole so programs can override the Keep console open option.
parent
dc86f9eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
Mac/Modules/macosmodule.c
Mac/Modules/macosmodule.c
+16
-0
No files found.
Mac/Modules/macosmodule.c
View file @
b19c667d
...
...
@@ -26,6 +26,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "Python.h"
#include "macglue.h"
#include "pythonresources.h"
#include <Windows.h>
#include <Files.h>
...
...
@@ -676,6 +677,20 @@ MacOS_CompactMem(PyObject *self, PyObject *args)
return
Py_BuildValue
(
"l"
,
rv
);
}
static
char
KeepConsole_doc
[]
=
"(flag) Keep console open 0:never, 1:on output 2:on error, 3:always"
;
static
PyObject
*
MacOS_KeepConsole
(
PyObject
*
self
,
PyObject
*
args
)
{
int
value
;
if
(
!
PyArg_ParseTuple
(
args
,
"i"
,
&
value
))
return
NULL
;
PyMac_options
.
keep_console
=
value
;
Py_INCREF
(
Py_None
);
return
Py_None
;
}
static
PyMethodDef
MacOS_Methods
[]
=
{
#if !TARGET_API_MAC_CARBON
{
"AcceptHighLevelEvent"
,
MacOS_AcceptHighLevelEvent
,
1
,
accepthle_doc
},
...
...
@@ -695,6 +710,7 @@ static PyMethodDef MacOS_Methods[] = {
{
"FreeMem"
,
MacOS_FreeMem
,
1
,
FreeMem_doc
},
{
"MaxBlock"
,
MacOS_MaxBlock
,
1
,
MaxBlock_doc
},
{
"CompactMem"
,
MacOS_CompactMem
,
1
,
CompactMem_doc
},
{
"KeepConsole"
,
MacOS_KeepConsole
,
1
,
KeepConsole_doc
},
{
NULL
,
NULL
}
/* Sentinel */
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment