Python shell doesn't launch

26 views
Skip to first unread message

rktu...@gmail.com

unread,
Dec 26, 2012, 5:05:10 PM12/26/12
to django...@googlegroups.com
Whenever I run "python manage.py shell," I don't get any errors, but  I get the following:

C:\Python27\Lib\site-packages\django\bin\mysite>python manage.py shell
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)

Any ideas on what am I doing or have done wrong?


Ramiro Morales

unread,
Dec 26, 2012, 5:11:21 PM12/26/12
to django...@googlegroups.com

That's what is supposed to happen. What did you expect?

Ryan Blunden

unread,
Dec 26, 2012, 5:17:33 PM12/26/12
to django...@googlegroups.com
That's Python's standard output when starting an interactive session.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/cBacqTBYkgQJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

rktu...@gmail.com

unread,
Dec 26, 2012, 5:45:49 PM12/26/12
to django...@googlegroups.com
You know what? I didn't "expect" anything because I HAVEN'T DONE THIS BEFORE!!!! That is why I am doing an introductory tutorial. Thanks, Ramiro - highly intelligent answer. Ryan - you are a professional.  

Gerald Klein

unread,
Dec 26, 2012, 5:45:32 PM12/26/12
to django...@googlegroups.com
@cramm0 obviously new to the game, cut him a break.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--

Gerald Klein DBA

Cont...@geraldklein.com

www.geraldklein.com

geraldklein.wordpress.com

j...@zognet.com

708-599-0352


Arch Awesome, Ranger & Vim the coding triple threat.

Linux registered user #548580 


Ryan Blunden

unread,
Dec 26, 2012, 6:40:24 PM12/26/12
to django...@googlegroups.com
Glad to be able to help.

I've got a few tips too :)

  - Use the excellent Django Extensions app which once you add it to your INSTALLED_APPS tuple, will allow you to run python manage.py shell_plus, which automatically imports all of the models for apps. This is great as it's not often that you want to use shell without importing some models at least.

Also, install iPython, it has great features (e.g. command history) that make it much friendlier than the standard interactive mode.

Cheers,
Ryan

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/_O0uxSfrIHIJ.

Ramiro Morales

unread,
Dec 26, 2012, 8:08:15 PM12/26/12
to django...@googlegroups.com
On Dec 26, 2012 7:46 PM, <rktu...@gmail.com> wrote:
>
> You know what? I didn't "expect" anything because I HAVEN'T DONE THIS BEFORE!!!! That is why I am doing an introductory tutorial. Thanks, Ramiro - highly intelligent answer. Ryan - you are a professional.

Wait. Why do you assume I was trying to troll you?. I'm not a native
english speaker and my question was honest and to the point, even if
terse.

But now you've made me think:

One of the basic things repeated many many times in our field (I think
it must have been so in the last decade) when it come to ask smart and
effective question is to state not only what are the results you get but
also what did you expect. How do you think we will be able to help you
if you don't tell us what were your expectations?

In the end, this might come to this sentence in part one of the official
tutorial (that I assume is the one you are following) when talking about
running manage.py shell:

"Now, let's hop into the interactive Python shell and play around with
the free API Django gives you. To invoke the Python shell, use this
command:

python manage.py shell
"

( https://docs.djangoproject.com/en/1.4/intro/tutorial01/#playing-with-the-api )

Personally I think people should not learn Python and Django at the same
time. In this way, having some Python familiarity will mean at this
point the reader will know at what the 'interactive Python shell' is.
Because it's beautifully explained in the most basic official Python
tutorial:

http://docs.python.org/2/tutorial/interpreter.html#interactive-mode

(it even has an example output very similar to the seemingly confusing
output you pasted in your first post).

This is the second thread in which my impression is that you'd be less
frustrated if you took the time to make yourself comfortable with the
basic Python concepts first.

Regards,
Reply all
Reply to author
Forward
0 new messages