shiv icon indicating copy to clipboard operation
shiv copied to clipboard

Supporting tab completion when using the REPL

Open kennydo opened this issue 6 years ago • 2 comments

Has there been any investigation done into whether/how to support niceties from the normal Python REPL like tab completion and command history?

I've tried using import site; site.enablerlcompleter() and import rlcompleter; import readline; readline.parse_and_bind("tab: complete") before calling code.interact(), but neither seem to be enough.

kennydo avatar Jul 19 '18 00:07 kennydo

hey @kennydo

I haven't done any investigation into this, mostly out of personal bias (I typically use iPython for interactive sessions, so it never occurred to me to check the command completion in an interactive pyz)

I'll find some time to look into this :)

lorencarvalho avatar Jul 25 '18 14:07 lorencarvalho

Noticed this issue and it made me think: is there a way to use SHIV_INTERPRETER but have it drop directly into an IPython REPL?

I guess I could do something like:

SHIV_ENTRY_POINT=IPython:embed

.. and include IPython as a requirement for my shiv. Wonder if there is or could be a better way.

it would be nice as I find myself having to do some quick and dirty debug with shivs sometimes and auto complete and IPython would be sweet here.

csm10495 avatar Feb 18 '21 05:02 csm10495