mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Patch 1352 (continued in issue 1329) by Christian Heimes.
Before sys.stderr is set to the proper thing, set it to a really simple file-like object that can print tracebacks using direct file descriptor I/O. This is handy for debugging.
This commit is contained in:
parent
1cd5bd2a2e
commit
826d8973ac
4 changed files with 136 additions and 1 deletions
|
@ -21,6 +21,13 @@ PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *);
|
|||
*/
|
||||
PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding;
|
||||
|
||||
/* Internal API
|
||||
|
||||
The std printer acts as a preliminary sys.stderr until the new io
|
||||
infrastructure is in place. */
|
||||
PyAPI_FUNC(PyObject *) PyFile_NewStdPrinter(int);
|
||||
PyAPI_DATA(PyTypeObject) PyStdPrinter_Type;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue