views:

24

answers:

1

I seem to have run into a strange bug or more likely some setting I am unfamiliar with on my system that is not allowing me to tab when I am in Django's shell (python manage.py shell is how I run it).

For obvious reasons this is proving to be annoying since I can't do any loops or conditonals in the shell. If I hit tab it completes all functions that are available to me, like bash does in a terminal. I've tried just using spaces for my indents but I always get an indentation error.

Does anyone know why this is happening and what I can do to get tab to work in my shell again? (It may be relevant to know that this is on a Ubuntu 9.04 system).

Edit: tab works fine in the regular pythong shell, it's only in django's that it doesn't.

Thanks.

+1  A: 

I'm guessing normally when you run python it's invoking something like ipython instead because the normal stock interpreter does not do tab-completion. It should pick up ipython automatically and use it, though. Try firing up a plain python interpreter (just run python at the command line) and running

import IPython

If you can do that, manage.py should use ipython. If not, maybe reinstall ipython as it would appear that the IPython module didn't get properly installed.

Daniel DiPaolo
Thanks, reinstalling ipython did it!
hora