1

I have ipython installed, I want to run a plain python interpreter instead with manage.py shell.

So I try,

python2.5 manage.py shell --plain

Which gave me an error, and text which suggest that --plain was passed to ipython

So I read, http://docs.djangoproject.com/en/dev/ref/django-admin/

which suggets

django-admin.py shell --plain

Which gives me

Error: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.

Which seem the correct thing for it to do.

What am I mising here? [Ubuntu Jaunty, django.VERSION = (1, 2, 0, 'alpha', 0), python 2.5 and 2.6]

agiliq
  • 7,518
  • 14
  • 54
  • 74
  • 1
    Both `./manage.py shell --plain` and `/usr/bin/python manage.py shell --plain` work as expected for me. I just aliased python to ipython; did you do something less common? – Xiong Chiamiov Aug 26 '09 at 19:13

2 Answers2

1

If the reason you want to use python's interpretor over iPython's is because you need to paste the doc tests, you can try typing

%doctest_mode

in the ipython console instead

In [1]: %doctest_mode
*** Pasting of code with ">>>" or "..." has been enabled.
Exception reporting mode: Plain
Doctest mode is: ON
>>> 
lprsd
  • 84,407
  • 47
  • 135
  • 168
  • 1
    What if you just really prefer the plain python interpreter? This answer may have solved the OP's problem but is not actually responsive to the question as stated. – Vicki Laidler Aug 19 '09 at 13:14
0

link to a blog post explaining the same thing for bpython

iElectric
  • 5,633
  • 1
  • 29
  • 31