prints() shouldn't throw an exception on windows when printing out very large objects

This commit is contained in:
Kovid Goyal 2012-07-31 21:17:42 +05:30
parent b7e169c67e
commit 99de8e6cc3

View File

@ -201,7 +201,8 @@ def prints(*args, **kwargs):
try:
file.write(arg)
except:
file.write(repr(arg))
import repr as reprlib
file.write(reprlib.repr(arg))
if i != len(args)-1:
file.write(bytes(sep))
file.write(bytes(end))