Start Python at client side from web app

Rob Williscroft rtw at freenet.co.uk
Wed Jan 21 17:59:18 EST 2009


Thomas Guettler wrote in news:6toehtFbrb81U1 at mid.individual.net in
comp.lang.python: 

> Sorry, I described my problem not well. Here is more information:
> 
> The main application is the intranet web application used with IE (ms
> windows client). But some action needs to be done on the client since
> you can't do it with html or javascript. 
> 
> 1. The user pushes a button in the web app.
> 2. Webserver sends signed python code to the client with own mime type
> 3. IE sends code to the python application.
> 4. Signature gets checked, Python code on the client gets executed.
> 5. Maybe send some data to the server with http.
> 
>  Thomas
> 
> Server runs Linux with Django and Postgres.
> 
> Thomas Guettler schrieb:
>> Hi,
>> 
>> I want to start Python at the client side from a web application. The
>> app is an intranet application, and all client PCs are under our
>> control (we can install software on them).
>> 
>> But I don't want to update the installation too often. Here is my
>> idea: 
>> 
>> We create a custom mime-type and register it on the client PC. The
>> web application can send signed python code to the client PC. If the
>> signature is correct, the code will be executed at the client. The
>> signature prevents others from executing code.
>> 
>> Has someone seen or done something like this before?

Two options come to mind:

1) use a HTA as you client app,

http://msdn.microsoft.com/en-us/library/ms536496(VS.85).aspx

The main drawback is it isn't a full browser so you loose things like 
back buttons, though some shortcuts F5 (refresh/reload) do work.

2) create a localhost web server, for the client side manipulation.
Then have your remote webserver render a form that posts via javavscript 
to the localhost webserver.  The localhost server would post back in
the same way.

Rob.
-- 
http://www.victim-prime.dsl.pipex.com/



More information about the Python-list mailing list