[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] GNUmed web interface - pyjamas

From: lkcl
Subject: Re: [Gnumed-devel] GNUmed web interface - pyjamas
Date: Sun, 11 Jul 2010 13:59:52 -0700 (PDT)

ok try this:

run the script.

you will need (with python2.5)
apt-get install simplejson
which you will NOT need with python2.6

you will need
unpack and python install

due to cherrypy psycopg2 integration being a bit of a failure, i'm getting
"psycopg2 pool exhausted" messages after the second and all subsequent
connection attempts, and the cherrypy service needs to be restarted.

this is obviously bad, and i am not enough of an expert on cherrypy to know
what to do.

but, at least this proves how you can do JSONRPC.

in the function get_doc_types() you can see for item in
gmDocuments.get_document_types() blah blah but rather than turn the results
into a jsonclass "hint" dictionary i have simply str()'d them for now.

to do a "proper" job, you would need some introspection which went and
analysed the objects:

  ditem = {'__jsonclass__': ["jsonmodule.%s" % item.__class__.__name__],

 which is exactly the kind of thing that's blindingly-obviously automatable.

 the reason for the insertion of "jsonmodule" is so that the javascript
(actually the pyjs compiler or the python behind the pyjamas-desktop) knows
to pick up {classname} from python module "jsonmodule".

 this will become relevant / clearer when i create a pyjamas app which
actually uses it.

 so, one on the TODO list for you already: solve the psycopg2 problem, or
find a better framework.


View this message in context:
Sent from the GnuMed - Dev mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]