How can i get auto completion in python after loading the webpy module?

Asked by Eleanor Berger

In IPython, after importing webpy auto completion no longer works.

Question information

Language:
English Edit question
Status:
Solved
For:
web.py Edit question
Assignee:
No assignee Edit question
Solved by:
Eleanor Berger
Solved:
Last query:
Last reply:
Revision history for this message
Best Eleanor Berger (intellectronica) said :
#1

You can still use 'python' with auto completion feature. Try it out directly. Fire up 'python':

    import readline, rlcompleter; readline.parse_and_bind("tab: complete")

and tab it! :-)

To make in sort that this will be run default when you fire up 'python'. Make a file called '~/.pythonstartup.py' and put the import line in it. Then set the 'PYTHONSTARTUP' environment variable to point to that file.

In bash, you can do it like the following.
edit ~/.bashrc and add:

    export PYTHONSTARTUP=~/.pythonstartup.py

Revision history for this message
Endolith (endolith) said :
#2

Why is this necessary? What does web.py do that breaks IPython?