0

In Jupyter Notebook if you type in [ it automatically completes it to [].

Same for the ( --> () and { --> {}

How can one make Ipython do this? I have anaconda installation of python that also includes Ipython

codingknob
  • 11,108
  • 25
  • 89
  • 126
  • https://stackoverflow.com/questions/2603798/ipython-tab-autocomplete-does-not-work-on-imported-module – mad_ Oct 01 '18 at 20:39
  • @mad_ that level of autocomplete does work in my installation. But the bracket complete does not. I'm not even sure if Ipython supports this (it should to be consistent with other tools like Jupyter) – codingknob Oct 01 '18 at 20:52
  • @codingknob Why should IPython be consistent with the Notebook? They are completely separate projects with different goals. Just curious why you mention that. FWIW, I don't think that IPython supports this – darthbith Oct 01 '18 at 23:22

1 Answers1

1

You think that is notebook or ipython's feature. But actually it isn't.

It's codemirror which is the front js lib of jupyter notebook.

There are some options:

  1. Use another front end which support this feature such as qtconsole.
  2. Here is a related solution.
Sraw
  • 18,892
  • 11
  • 54
  • 87
  • does this work in qtconsole by default or does one need to follow the instructions in #2? I just launched qtconsole and typed " and it did not automatically supply the close " – codingknob Oct 02 '18 at 20:03
  • I created a ~\.inputrc file and placed the suggested text in the file. I saved it and relaunched qtconsole and I still do not experience the autocomplete. Mind you I have a windows OS.... – codingknob Oct 02 '18 at 20:22
  • I am sorry I have little idea about windows OS as I'm a linux developer. I've tried to figure it out and found there are some problems specified on Windows. Basically the problem is how to use `readline` module on Windows correctly as there is a built in module named GNU readline on linux. I believe if this problem can be solved, the correct inputrc file can let `ipython` work even without qtconsole. And btw, `ipython` is just a backend, `notebook`'s python backend is exactly `ipython`. – Sraw Oct 02 '18 at 21:19
  • Okay no worries. I think I will get my IT guy to give me access to a Linux box as Windows is always a nightmware. I truly appreciate your time on this. – codingknob Oct 02 '18 at 21:40