Is there an obvious way to do this in python?

H J van Rooyen mail at microcorp.co.za
Fri Aug 4 02:04:15 EDT 2006


 "Bruno Desthuilliers" <onurb at xiludom.gro>wrote:


| H J van Rooyen wrote:
| >  "Bruno Desthuilliers" <onurb at xiludom.gro> wrote:
| (snip)
| > |> If my original post was unclear I am sorry - the point I want answered,
if
| > |> possible, is how to make the client code effectively updateable on the
fly -
| > |> because the answer to this will influence the whole design of the rest of
the
| > |> system...
| > |
| > |This is something I have been thinking about... IMHO what you want is
| > |not to "update client code on the fly", but to make the client mostly a
| > |kind of interpreter for what the server sends in. That is, the client
| > |code itself doesn't contain any application logic, it gets it from the
| > |server and execute it. This can certainly be done with Pyro.
| > |
| > |Now while this may be an interesting project, I'm not really sure it's
| > |worth the effort when we already have HTTP, HTML and AJAX...
| >
| > You may be right and it might not be worth the trouble  - but what you
mention
| > above is closer to the sort of thing I have in mind - it is essentially
using
| > python to create a script language, and moving scripts around - but hey -
python
| > is already a script language...
|
| Yes, but it's not (alas) supported by browsers...
|
| > so if Pyro is for 'moving the scripts around' - Then that is what I must
look at
| > very hard...
|
| It's not for "moving the scripts around", it's for remote objects - kind
| of like Java's RMI, but, well, much more pythonic !-). Now the point is
| that Python being very powerful when it comes to dynamism and
| introspection, it should be possible to have a common client that
| basically just knows how to connect to the application server (using
| pyro). Once connected, the client asks the server for a set of objects
| (forms, menus etc) and the corresponding data. These objects then use
| the same mechanism to interact with the server. It's basically similar
| to the interaction between a browser and a web app - in that the client
| is potentially able to run any application sent by the server -, but
| with much more  specialized client and app server and another protocol -
| and no other language than Python.
|

This is getting more and more interesting - its not the simple minded mechanism
I had in mind, but it will achieve the same thing, and it exists already - and I
can imagine it to be a very powerful mechanism, if I understand you correctly -
I am going to have to cry "time out!" to go and do some reading...

Thank you. - Hendrik





More information about the Python-list mailing list