diff Python/sysmodule.c @ 1073:2c0432fcc270 legacy-trunk

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.
author Guido van Rossum <guido@python.org>
date Fri, 25 Sep 1992 21:59:05 +0000
parents a1ce5a949828
children 2937897a7d8b
line wrap: on
line diff
--- a/Python/sysmodule.c	Fri Sep 25 21:54:05 1992 +0000
+++ b/Python/sysmodule.c	Fri Sep 25 21:59:05 1992 +0000
@@ -62,7 +62,7 @@
 {
 	FILE *fp = NULL;
 	object *v = sysget(name);
-	if (v != NULL)
+	if (v != NULL && is_fileobject(v))
 		fp = getfilefile(v);
 	if (fp == NULL)
 		fp = def;