This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients Ramchandra Apte, martin.panter, roger.serwy, serhiy.storchaka, terry.reedy
Date 2016-07-26.08:53:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1469523210.99.0.730522142169.issue17238@psf.upfronthosting.co.za>
In-reply-to
Content
The readline completion code does not strictly depend on on Readline, although currently it is modelled after its quirky API. But we can change that by adding a more general API.

In <https://bugs.python.org/issue25419#msg266320>, I suggested an API “complete_code(code) -> list of modules, attributes, globals, etc.” In the Readline case, you pass in the line of code up to the cursor, and it would return possible completions. Perhaps Idle might pass in multiple lines of code. There could also be a predefined global namespace, either as another parameter, or preloaded into a completer object.

When I briefly looked at the Idle code a while back, it did not seem easy for me to adapt to this sort of API. But maybe you have a better idea of what could be done.
History
Date User Action Args
2016-07-26 08:53:31martin.pantersetrecipients: + martin.panter, terry.reedy, roger.serwy, Ramchandra Apte, serhiy.storchaka
2016-07-26 08:53:30martin.pantersetmessageid: <1469523210.99.0.730522142169.issue17238@psf.upfronthosting.co.za>
2016-07-26 08:53:30martin.panterlinkissue17238 messages
2016-07-26 08:53:30martin.pantercreate