On Wed, 2 Dec 2009 11:36:48 -0500
Bill Freeman <ke1g...@gmail.com> wrote:

> import a
> 
> does not automatically import modules and sub packages of package a.
> It takes special action in a's __init__.py to make this happen as it
> does for os.path when
> you import os.
> 
> I assume that you're doing this directly in python, since in the
> manage.py shell other stuff has already caused django.core to be
> imported, so it's available. (And Frank was probably using the
> manage.py shell, thus finding that he didn't have to separately
> import django.core .)
> 
> On Wed, Dec 2, 2009 at 11:14 AM, Kenny Meyer <knny.m...@gmail.com>
> wrote:
> > Hi guys,
> >
> > I have some strange behaviour in my interactive python shell, when
> > trying to browse Django modules...
> >
> > Example:
> >
> >>>> import django
> >>>> dir(django.core)
> > AttributeError: 'module' object has no attribute 'core'
> >
> >>>> import django.core
> >>>> dir(django.core)
> > ['__builtins__', '__doc__', '__file__', '__name__', '__package__',
> > '__path__']
> >
> > Can anyone, please, explain me this strange (to me) behaviour?
> >
> > Regards,
> > Kenny
> >
> > --------------------------------------------------------------------
> >  .'  `.    knny [d0t] myer [at] gmail [d0t] com [42!]
> >  |a_a  |   http://kenny.paraguayinfos.de | gpg key ID: 0x00F56BA1B2
> >  \<_)__/   --------------------------------------------------------
> >  /(   )\   Everything should be made as simple as possible, but not
> >  |\`> < /\                        simpler.
> >  \_|=='|_/                                        -- Albert Einstein
> >
> 
> --
> 
> You received this message because you are subscribed to the Google
> Groups "Django users" group. To post to this group, send email to
> django-us...@googlegroups.com. To unsubscribe from this group, send
> email to django-users+unsubscr...@googlegroups.com. For more options,
> visit this group at http://groups.google.com/group/django-users?hl=en.
> 
> 

Hello Bill,

I haven't seen your reply at first... Slow receiving from mail-client.

I've done as you said, and yes, I successfully browse all modules when
running `manage.py shell`, but because I was using directly using
Python, I received just the limited output.

Thanks for the explanation.

Regards,
Kenny

Attachment: signature.asc
Description: PGP signature

Reply via email to