Re: Any projects to provide Javascript-style client-side browser access via Python?

2005-08-27 Thread Terry Hancock
On Friday 26 August 2005 02:29 pm, Kenneth McDonald wrote:
> I'm curious about this because, quite aside their function as web  
> browsers, it is now possible to build some very useable interfaces  
> using browsers with HTML, CSS, and JavaScript. (The biggest problem  
> is still the lack of a decent text widget.) However, JavaScript isn't  
> really a good language for building complex applications, and it  
> would be very cool if there were some way to use Python to replace  
> client-side JavaScript, in order to gain access the DOM.
> 
> So anyone know if there are projects underway on this?

You can currently do this by requiring Java in the browser and
using Jython for scripting.  However, it's not terribly efficient (the
Jython interpreter has to be part of the download).

OTOH, it would be possible in principle to make that into a plugin
instead of just an applet, then you would have reduced the
repeated overhead.

There hasn't seemed to be much interest in doing this, though.

Another problem is that there is some dissatisfaction that there
is any way to provide an adequate "secure" sandbox for the
python applet to run in.  OTOH, if it were running in Jython
on a Java applet, it would be subject to the same sandboxing
that is provided for Java applets.

I don't know how to ensure the same limits from a Java plugin,
but I assume it's probably possible.

Cheers,
Terry
--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Any projects to provide Javascript-style client-side browser access via Python?

2005-08-27 Thread Alessandro Bottoni
Kenneth McDonald wrote: 
> So anyone know if there are projects underway on this?

As long as I know, Mozilla (as Firefox, Thunderbird and Sunbird) can host
Python as an internal scripting language thanks to PyXPCOM (the Python
binding to the XPCOM cross-platform COM technology used by Mozilla). In
this case, you have to recompile Mozilla from source to enable the PyXPCOM
support (that is: you will end up having a "custom" Mozilla to distribute
to your users).

Have a look at www.mozilla.org and www.mozdev.org and/or search for PyXPCOM
on Google.

(Most likely, something like that is available for Konqueror and others
Linux browsers, as well)

HTH

---
Alessandro Bottoni
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Any projects to provide Javascript-style client-side browser access via Python?

2005-08-26 Thread Leif K-Brooks
Kenneth McDonald wrote:
> I'm curious about this because, quite aside their function as web 
> browsers, it is now possible to build some very useable interfaces 
> using browsers with HTML, CSS, and JavaScript. (The biggest problem  is
> still the lack of a decent text widget.) However, JavaScript isn't 
> really a good language for building complex applications, and it  would
> be very cool if there were some way to use Python to replace 
> client-side JavaScript, in order to gain access the DOM.

You could try Livepage, which is a part of Nevow . It
doesn't cut JavaScript completely out of the picture, but you could put
all of your real code in Python and only use JavaScript as a simple
layer to access the DOM.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Any projects to provide Javascript-style client-side browser access via Python?

2005-08-26 Thread Kenneth McDonald
On Aug 26, 2005, at 3:04 PM, Paul Rubin wrote:Python isn't a good choice as a browser language because it doesn't have enough security.  Hostile scripts can take over the interpreter too easily.    There was a Python-based browser effort called Grail which I don't think got very far.  Personally I think there are very few good uses for complex client side browser scripts.  Most sites that use _javascript_ don't really need to. My belief is that if HTML/CSS/DOM can add a few more (admittedly difficult) features, then it will become a serious contender for fairly complex UI programs, i.e. ones that don't access web pages--it will be a replacement for existing UI libraries such as for Windows or OS X, wxWindows, Qt, etc. And if that's the case, then the security issue is irrelevant, and similarly, the need to be able to write significant programs becomes much greater.Ken-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Any projects to provide Javascript-style client-side browser access via Python?

2005-08-26 Thread Paul Rubin
Kenneth McDonald <[EMAIL PROTECTED]> writes:
> I'm curious about this because, quite aside their function as web
> browsers, it is now possible to build some very useable interfaces
> using browsers with HTML, CSS, and JavaScript. (The biggest problem
> is still the lack of a decent text widget.) However, JavaScript isn't
> really a good language for building complex applications, and it
> would be very cool if there were some way to use Python to replace
> client-side JavaScript, in order to gain access the DOM.
> 
> So anyone know if there are projects underway on this?

Python isn't a good choice as a browser language because it doesn't
have enough security.  Hostile scripts can take over the interpreter
too easily.  

There was a Python-based browser effort called Grail which I don't
think got very far.

Personally I think there are very few good uses for complex client
side browser scripts.  Most sites that use Javascript don't really
need to.
-- 
http://mail.python.org/mailman/listinfo/python-list


Any projects to provide Javascript-style client-side browser access via Python?

2005-08-26 Thread Kenneth McDonald
I'm curious about this because, quite aside their function as web  
browsers, it is now possible to build some very useable interfaces  
using browsers with HTML, CSS, and JavaScript. (The biggest problem  
is still the lack of a decent text widget.) However, JavaScript isn't  
really a good language for building complex applications, and it  
would be very cool if there were some way to use Python to replace  
client-side JavaScript, in order to gain access the DOM.

So anyone know if there are projects underway on this?

Thanks,
Ken
-- 
http://mail.python.org/mailman/listinfo/python-list