Hi,

first, happy new year to all :-)

I have successfully integrate pyjamas (http://pyjamas.pyworks.org/)
with Webware.
This mean that a page generate by pyjamas can query using JSON a Webware
servlet.
Like AjaxPage I have build a jsonPage which can be use as a root class.
So a simple servlet example look like
JSONRPC.py:
------------------------
from jsonPage import jsonPage as BaseClass

class JSONRPC(BaseClass):
    def __init__(self):
        BaseClass.__init__(self)

    def echo(self, msg):
        return msg

    def reverse(self, msg):
        return msg[::-1]

    def uppercase(self, msg):
        return msg.upper()

    def lowercase(self, msg):
        return msg.lower()

    def json_methods(self):
        return BaseClass.json_methods(self) + ['echo', 'reverse',

                                               'uppercase', 'lowercase']
------------------------


I have also fix a bug in HTTPRequest.py:

Index: HTTPRequest.py
===================================================================
--- HTTPRequest.py      (revision 6033)
+++ HTTPRequest.py      (working copy)
@@ -597,7 +597,7 @@

                """
                fs = self.fieldStorage()
-               if fs and fs.file:
+               if fs is not None and fs.file:
                        if rewind:
                                fs.file.seek(0)
                        return fs.file



If anyone want more information I can post the complete source code
somewhere.


JF

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Webware-devel mailing list
Webware-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to