Saturday, August 27, 2011

ipython 0.11 with django 1.3 /in virtualenv

Hi,


I am having issues with ipythin when I run

./manage.py shell
then ipython_config.py doesn't seem to be executed.

On the other hand if I run ipython directly the file is imported.

Am I missing something?


My setup:

$ find ~/.config/ipython/
/home/gelonida/.config/ipython/
/home/gelonida/.config/ipython/profile_default
/home/gelonida/.config/ipython/profile_default/log
/home/gelonida/.config/ipython/profile_default/ipython_config.py
/home/gelonida/.config/ipython/profile_default/history.sqlite
/home/gelonida/.config/ipython/profile_default/security
/home/gelonida/.config/ipython/profile_default/pid
/home/gelonida/.config/ipython/profile_default/db
/home/gelonida/.config/ipython/profile_default/db/dhist
/home/gelonida/.config/ipython/README

The contents of
/home/gelonida/.config/ipython/profile_default/ipython_config.py

The first few lines are:
import time
print (("HELLO "*17)+"\n") * 20
time.sleep(2)

I added the sleep statement in case, that the print statement woudl have
been overwritten.

If I start ipython,
then I see the HELLO text and a delay of 2 seconds happens


with

./manage.py shell

I don't see the output.

I n order to be sure, that there's nothing weird in my django project I
tested this also with an unmodified django project, which I just created
with.

In order to reproduce just run once
create a
~/.config/ipython/profile_default/ipython_config.py
with a print statement

and start
ipython
# here you should see print statements of ./manage.py shell


then do:


django-admin startproject tstipython
cd tstipython
./manage.py shell
# here you do not see print statements of ./manage.py shell

Thanks in advance for any explanations.
I would really like to understand what exactly happens.


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

No comments:

Post a Comment