mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Patch 1267 by Christian Heimes.
Move the initialization of sys.std{in,out,err} and __builtin__.open to C code. This solves the problem that "python -S" wouldn't work.
This commit is contained in:
parent
75a902db78
commit
ce3a72aec6
11 changed files with 175 additions and 31 deletions
|
@ -2425,6 +2425,12 @@ change in future releases of Python.
|
|||
pointer, *fp*. The function *close* will be called when the file should be
|
||||
closed. Return *NULL* on failure.
|
||||
|
||||
.. cfunction:: PyFile_FromFileEx(FILE *fp, char *name, char *mode, int (*close)(FILE *), int buffering, char *encoding, char *newline)
|
||||
|
||||
Create a new :ctype:`PyFileObject` from the already-open standard C file
|
||||
pointer, *fp*. The functions works similar to *PyFile_FromFile* but takes
|
||||
optional arguments for *buffering*, *encoding* and *newline*. Use -1 resp.
|
||||
*NULL* for default values.
|
||||
|
||||
.. cfunction:: FILE* PyFile_AsFile(PyObject *p)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue