Call printobject instead of fwrite to print strings.

This commit is contained in:
Guido van Rossum 1991-07-22 11:48:07 +00:00
parent 56f7837704
commit a60810973d
1 changed files with 2 additions and 2 deletions

View File

@ -442,8 +442,8 @@ eval_code(co, globals, locals, arg)
if (is_stringobject(v)) {
char *s = getstringvalue(v);
int len = getstringsize(v);
fwrite(s, 1, len, fp);
if (len > 0 && s[len-1] == '\n')
err = printobject(v, fp, PRINT_RAW);
if (err == 0 && len > 0 && s[len-1] == '\n')
softspace(sysget("stdout"), 0);
}
else {