mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Modified most (but not yet all) I/O to always go through sys.stdout or
sys.stderr or sys.stdin, and to work with any object as long as it has a write() (respectively readline()) methods. Some functions that took a FILE* argument now take an object* argument.
This commit is contained in:
parent
3a40ae4ef3
commit
3165fe6a56
8 changed files with 217 additions and 76 deletions
|
@ -62,7 +62,7 @@ sysgetfile(name, def)
|
|||
{
|
||||
FILE *fp = NULL;
|
||||
object *v = sysget(name);
|
||||
if (v != NULL)
|
||||
if (v != NULL && is_fileobject(v))
|
||||
fp = getfilefile(v);
|
||||
if (fp == NULL)
|
||||
fp = def;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue