[BangPypers] Python app in a browser sandbox?

Jeff Rush jeff at taupro.com
Fri Feb 22 19:33:33 CET 2008


logan wrote:
>  
> I'm new to this list and a Python fresher. I wanted to know how can I 
> run my Python application (actually it's just a Python wrapper over a 
> C++ lib) inside a web browser? My intent is that the user opens the 
> website and then the Python application is loaded in the user's memory 
> and there after the user is able to use the application. For example, 
> say the application is notepad, the user launches the site and the 
> Python notepad is loaded as some kind of ActiveX control and the user 
> can use it. I may add that the application just needs the microphone and 
> speakers of the user and doesn't need access to any other resource.

Oh, one other approach you could take is to require each user to have already 
downloaded and installed your application (again a version for each OS), and 
then associate a MIME type within the browser such that when they visit some 
resource on your website, the browser initiates the execution of an external 
application which would be your program.  It wouldn't run "within" the browser 
per se, and it won't be sandboxed so the user has to trust you, and there is a 
risk that a cracker might trigger your app from some other website, for a 
nefarious purpose like listening to the microphone, but it would work.

-Jeff


More information about the BangPypers mailing list