summaryrefslogtreecommitdiffstats
path: root/Lib/gettext.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/gettext.py')
-rw-r--r--Lib/gettext.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/gettext.py b/Lib/gettext.py
index 6e29176..a20c6f1 100644
--- a/Lib/gettext.py
+++ b/Lib/gettext.py
@@ -77,7 +77,10 @@ def c2py(plural):
Python lambda function that implements an equivalent expression.
"""
# Security check, allow only the "n" identifier
- from StringIO import StringIO
+ try:
+ from cStringIO import StringIO
+ except ImportError:
+ from StringIO import StringIO
import token, tokenize
tokens = tokenize.generate_tokens(StringIO(plural).readline)
try: