Hi Jean-Francois,
I think your work could benefit others -- I would suggest that you create a=
ticket (in sourceforge), and post the full code there.
peace,
Jason
----- Jean-Fran=C3=A7ois Pi=C3=A9ronne <jf.pieronne@...> wrote:
> Hi,
>=20
> first, happy new year to all :-)
>=20
> 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
>=20
> class JSONRPC(BaseClass):
> def __init__(self):
> BaseClass.__init__(self)
>=20
> def echo(self, msg):
> return msg
>=20
> def reverse(self, msg):
> return msg[::-1]
>=20
> def uppercase(self, msg):
> return msg.upper()
>=20
> def lowercase(self, msg):
> return msg.lower()
>=20
> def json_methods(self):
> return BaseClass.json_methods(self) + ['echo', 'reverse',
>=20
> 'uppercase',
> 'lowercase']
> ------------------------
>=20
>=20
> I have also fix a bug in HTTPRequest.py:
>=20
> Index: HTTPRequest.py
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- HTTPRequest.py=09(revision 6033)
> +++ HTTPRequest.py=09(working copy)
> @@ -597,7 +597,7 @@
>=20
> =09=09"""
> =09=09fs =3D self.fieldStorage()
> -=09=09if fs and fs.file:
> +=09=09if fs is not None and fs.file:
> =09=09=09if rewind:
> =09=09=09=09fs.file.seek(0)
> =09=09=09return fs.file
>=20
>=20
>=20
> If anyone want more information I can post the complete source code
> somewhere.
>=20
>=20
> JF
>=20
> -------------------------------------------------------------------------
> 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=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDEV
> _______________________________________________
> Webware-devel mailing list
> Webware-devel@...
> https://lists.sourceforge.net/lists/listinfo/webware-devel
|