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:
Guido van Rossum 1992-09-25 21:59:05 +00:00
parent 3a40ae4ef3
commit 3165fe6a56
8 changed files with 217 additions and 76 deletions

View file

@ -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;