summaryrefslogtreecommitdiffstats
path: root/Lib/pprint.py
diff options
context:
space:
mode:
authordoko@ubuntu.com <doko@ubuntu.com>2013-04-08 19:20:09 (GMT)
committerdoko@ubuntu.com <doko@ubuntu.com>2013-04-08 19:20:09 (GMT)
commit6cb4343d0d374a1b0ba01390ccef5b8868a5e9fc (patch)
tree2910e0d66761a1cfb25f3bc06d8679e459398104 /Lib/pprint.py
parent7e360b39632cc0fb45f79fe66bec5f647596518e (diff)
downloadcpython-6cb4343d0d374a1b0ba01390ccef5b8868a5e9fc.zip
cpython-6cb4343d0d374a1b0ba01390ccef5b8868a5e9fc.tar.gz
cpython-6cb4343d0d374a1b0ba01390ccef5b8868a5e9fc.tar.bz2
- Issue #13150, #17512: sysconfig no longer parses the Makefile and config.h
files when imported, instead doing it at build time. This makes importing sysconfig faster and reduces Python startup time by 20%.
Diffstat (limited to 'Lib/pprint.py')
-rw-r--r--Lib/pprint.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/pprint.py b/Lib/pprint.py
index 910283e..330099d 100644
--- a/Lib/pprint.py
+++ b/Lib/pprint.py
@@ -37,7 +37,10 @@ saferepr()
import sys as _sys
import warnings
-from cStringIO import StringIO as _StringIO
+try:
+ from cStringIO import StringIO as _StringIO
+except ImportError:
+ from StringIO import StringIO as _StringIO
__all__ = ["pprint","pformat","isreadable","isrecursive","saferepr",
"PrettyPrinter"]