Author: Armin Rigo <[email protected]>
Branch:
Changeset: r75015:e8b468bcd294
Date: 2014-12-18 16:37 +0000
http://bitbucket.org/pypy/pypy/changeset/e8b468bcd294/
Log: (idea by antocuni) Complain clearly when trying to import 'readline'
on Windows.
diff --git a/lib_pypy/readline.py b/lib_pypy/readline.py
--- a/lib_pypy/readline.py
+++ b/lib_pypy/readline.py
@@ -6,4 +6,11 @@
are only stubs at the moment.
"""
-from pyrepl.readline import *
+try:
+ from pyrepl.readline import *
+except ImportError:
+ import sys
+ if sys.platform == 'win32':
+ raise ImportError("the 'readline' module is not available on Windows"
+ " (on either PyPy or CPython)")
+ raise
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit