Hi Arnar,

Thanks for clearing that up, that explains why it works in the context
django and not just in the python shell. I understand now, I'll stop
by the pyamf developers list for sure this week :)

Cheers,

Bert

On Nov 26, 6:50 pm, Arnar <[EMAIL PROTECTED]> wrote:
> Hello Bert,
>
> Sorry for the late reply.
>
> On Nov 22, 3:50 pm, Bert Heymans <[EMAIL PROTECTED]> wrote:
>
>
>
> > Installing went fine (sudopythonsetup.py install), and the tests are
> > OK (pythonsetup.py test) but somehow I can't access thedjango
> > package. This is the output I get in a terminal:
>
> >Python2.5 (r25:51918, Sep 19 2006, 08:49:13)
> > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
> > Type "help", "copyright", "credits" or "license" for more information.>>> 
> > from pyamf.gateway.djangoimport DjangoGateway
>
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in <module>
> >   File "pyamf/gateway/django.py", line 37, in <module>
> >     _thismodule = sys.modules['django']
> > KeyError: 'django'>>> import pyamf.gateway
> > >>> dir(pyamf.gateway)
>
> > ['BaseGateway', 'ServiceRequest', 'ServiceWrapper', '__builtins__',
> > '__doc__', '__file__', '__name__', '__path__', 'remoting', 'sys',
> > 'traceback', 'types']
>
> > You see, no 'django' in the list. Anyway, if I look at the sourcecode
> > it's all there in the gateway package there's 'django', 'twisted' and
> > 'wsgi'.
>
> It is finding the pyamf.gateway.djangopackage allright, the line it
> fails on is in that module. IsDjangoon yourpythonpath?
>
> It is due to a trick we have to use to both call our subpackage
> "django" and still be able to import the real (top-level)django
> package. The trick is to mess with sys.modules a bit (see the code).
>
> Please stop by on the pyamf developers list and post us steps to
> reproduce this and we'll sort it out.
>
> cheers,
> Arnar
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to