Python console tab autocomplete
It just takes 4 lines of code to enhance the good old python console with tab autocompletion (just like in IPython):
import readline
import rlcompleter
readline.set_completer(rlcompleter.Completer(imported_objects).complete)
readline.parse_and_bind("tab:complete")
* (tested in Python 2.7)
** (borrowed from django's shell command source code)
Written by Eric Marcos Pitarch
Related protips
1 Response
...and the variable 'imported_objects'? Where does it come from?
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#