diff Lib/pprint.py @ 82872:66e30c4870bb 2.7

- Issue #13150: 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%.
author doko@ubuntu.com
date Thu, 21 Mar 2013 15:02:16 -0700
parents 751c6dd71b5e
children d174cb3f5b9e
line wrap: on
line diff
--- a/Lib/pprint.py	Wed Mar 20 13:11:04 2013 -0500
+++ b/Lib/pprint.py	Thu Mar 21 15:02:16 2013 -0700
@@ -37,7 +37,10 @@
 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"]