New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support system readline on OS X 10.6 #51121
Comments
The readline library supplied in OS X 10.6 looks good enough to use in There's a curious off-by-one difference between Apple's readline (which, I was able to get Python trunk + system readline working on OS X 10.6 Python 2.7a0 (trunk:74735M, Sep 9 2009, 19:40:25)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import readline
[39474 refs]
>>> readline.get_history_item(0)
'import readline'
[39476 refs]
>>> readline.get_history_item(2)
'readline.get_history_item(2)'
[39476 refs] Interestingly, the Apple-supplied Python also behaves this way: Mark-Dickinsons-MacBook-Pro:trunk dickinsm$ python
Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import readline
>>> readline.get_history_item(0)
'import readline'
>>> readline.get_history_item(2)
'readline.get_history_item(2)' If people think this is worth pursuing, I'll put together a proper |
And here's the patch. |
I wouldn't mind having a proper patch and doing away with the need for IMHO the patch should try to stay as close to GNU readline's interface BTW. I suppose the configuration (readline.parse_and_bind) needs to be BTW. If you want to push the Apple's readline to the limit you should |
Hmm. This is looking like a bigger task than I bargained for. I notice
I suppose so. I'm a bit worried about subtle bugs occurring as a result Thanks for the ipython suggestion; I've never used it before, but I'll |
I also agree that this is desirable to have, and that the readline module |
This patch could potentially break non-Mac OS X systems. Unfortunately, I was lingering for over a year with opening a tracker Sorry for opening the double issue. |
Also, the patch from bpo-6877 changes setup.py in a way that enables Such build is used for about two years already (Python 2.4) by several |
it seems to me, that any and all readline interfaces should/could it's definitely more logical for a python programmer to expect i would propose that everything be zero-based; |
purpleidea : Whether or not indexes should be 0-based in general is beyond |
I've added an updated patch to bpo-6877 that implements the same 1-based That patch would, possibly with clearer documentation, IMHO fix this |
This is a duplicate of bpo-6877, I'm therefore closing this one. I've just committed a slightly updated patch from that issue to the trunk |
Thanks for working on this, Ronald. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: