Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to auto complete in an iPython notebook while on ipdb?

I am running some cell in an iPython notebook. I used the %%debug command in the head of the cell. Now, when i am on ipdb prompt and i hit the ctrl+space or tab, auto complete can't seem to be working.

How to use auto complete?

like image 295
aviyaron Avatar asked Mar 19 '16 12:03

aviyaron


People also ask

How do I enable auto completion in Jupyter Notebook?

To enable code autocomplete in Jupyter Notebook or JupyterLab, you just need to hit the Tab key while writing code. Jupyter will suggest a few completion options. Navigate to the one you want with the arrow keys, and hit Enter to choose the suggestion.

Does IPython have tab completion feature?

Latex and Unicode completion IPython and compatible frontends not only can complete your code, but can help you to input a wide range of characters. In particular we allow you to insert a unicode character using the tab completion mechanism.

What does %% do in Jupyter Notebook?

Both ! and % allow you to run shell commands from a Jupyter notebook. % is provided by the IPython kernel and allows you to run "magic commands", many of which include well-known shell commands. ! , provided by Jupyter, allows shell commands to be run within cells.


Video Answer


1 Answers

Install pyreadline:

pip install pyreadline

Open jupyter notebook & run the following in one the cell:

%config IPCompleter.greedy=True

Whenever you want to do autocomplete, just press TAB.

Works for me !!!

like image 95
Bhavya Ghai Avatar answered Oct 04 '22 05:10

Bhavya Ghai