On Monday, August 21, 2017 at 1:31:05 AM UTC-4, RjOllos wrote: > > > The snippet that goes into the equivalent of console.py now looks like: >> >> try: >> import readline as rl >> except ImportError: >> try: >> import pyreadline as rl >> except ImportError: >> rl = None >> >> I’ve observed no regression while using the Python implementation vs. the >> native library. >> > > That looks interesting. We could reorder the operations to prefer > pyreadline when installed: > > try: > import pyreadline as rl > except ImportError: > try: > import readline as rl > except ImportError: > rl = None >
I misunderstood. It looks like pyreadline is only for Windows. On OSX I get: >>> import pyreadline Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/rjollos/Documents/Workspace/trac-dev/pve/lib/python2.7/site-packages/pyreadline/__init__.py", line 12, in <module> from . import logger, clipboard, lineeditor, modes, console File "/Users/rjollos/Documents/Workspace/trac-dev/pve/lib/python2.7/site-packages/pyreadline/clipboard/__init__.py", line 13, in <module> from .win32_clipboard import GetClipboardText, SetClipboardText File "/Users/rjollos/Documents/Workspace/trac-dev/pve/lib/python2.7/site-packages/pyreadline/clipboard/win32_clipboard.py", line 37, in <module> import ctypes.wintypes as wintypes File "/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/wintypes.py", line 19, in <module> class VARIANT_BOOL(_SimpleCData): ValueError: _type_ 'v' not supported On Windows, with pyreadline installed "import readline" succeeds (if I remember correctly from testing last week), so I'm not sure why we'd need special import handling. - Ryan -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-dev+unsubscr...@googlegroups.com. To post to this group, send email to trac-dev@googlegroups.com. Visit this group at https://groups.google.com/group/trac-dev. For more options, visit https://groups.google.com/d/optout.