Hi Arnar,

Cool, I'm checking it out at this moment, I'd love to use it. I'm
trying out the example on the wiki here http://pyamf.org/wiki/DjangoHowto
but I can't get it to work just yet.

Maybe I did something wrong or the install script didn't behave like
it's supposed to in my environment (Mac OSX 10.4, python 2.5). I got
the PyAMF code from the subverison repository here ( svn co
http://svn.pyamf.org/pyamf/trunk pyamf )

Installing went fine (sudo python setup.py install), and the tests are
OK (python setup.py test) but somehow I can't access the django
package. This is the output I get in a terminal:

Python 2.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.django import 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'.

I'll post my solution when I solve the problem, but I'd appreciate it
if anyone could already give help me with some pointers :)

Bert


On Nov 9, 5:41 pm, Arnar <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> Some here might be interested in the following, others - excuse this
> annoyance :o)
>
> A few folks (Nick Joyce and Thijs Triemstra mostly) are working onPyAMF, an 
> AMF encoder and decoder in Python. It may be considered pre-
> alpha for the moment. It includes Remoting gateways for Twisted, WSGI
> and now Django as well.
>
> Exposing functions for AMF remoting is simple, define a gateway (a
> dispatcher) like this:
>
> # yourproject/yourapp/amfgateway.py
>
> frompyamfimport gateway
>
> def echo(data):
>     return data
>
> echoGateway = gateway.BaseGateway({'echo': echo})  # could include
> other functions as well
>
> and add them to urlconf via a generic view:
>
> # yourproject/urls.py
>
> urlpatterns = patterns('',
>
>     # AMF Remoting Gateway
>     (r'^gateway/', 'pyamf.gateway.djangogateway.DjangoGateway',
>                  {'gateway':
> 'yourproject.yourapp.amfgateway.echoGateway'}),
>
> )
>
> Hope you check it out and give us a hand with testing. The project
> website ishttp://pyamf.org/
>
> cheers,
> Arnar
>
> ps. we are aware of DjangoAMF,PyAMFis meant as a more generic AMF
> implementation - not exclusive to Django.
--~--~---------~--~----~------------~-------~--~----~
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