473,405 Members | 2,444 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Mozilla, XUL and the snake

Hi,

Does anybody know how far you can get nowadays with trying to use Python
as the script language for XUL instead of JS? Is it possible (even
theoretically) to write full-fledged applications on the Mozilla
platform with python only?

In a parallel vein, anybody know what the architecture of Komodo is?

Thanks for any pointers, information, etc

Kuba

PS. Yes, I have seen the recently-publicized wishlist for Mozilla 2 and
I have tried to run MozPython in M1.7 or F0.9, and failed miserably. I
have been trying to dig through the Mozilla docs to find anything I
could infer this information from, but it seems that the amount of
mozilla docs that "might contain some hidden clues" piling up in front
of me is neverending...

Jul 18 '05 #1
4 2377
Jakub Fast wrote:
Hi,

Does anybody know how far you can get nowadays with trying to use Python
as the script language for XUL instead of JS? Is it possible (even
theoretically) to write full-fledged applications on the Mozilla
platform with python only?


yeah, theoretically is it possible by using PyXPCOM:
<http://aspn.activestate.com/ASPN/Downloads/Komodo/PyXPCOM/>

the author of mozpython offers binaries of
pyxpcom, cuz is damn tricky to compile the package:

<http://www.thomas-schilz.de/MozPython/downloads/>

HTH,
deelan

--
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<#me> a foaf:Person ; foaf:nick "deelan" ;
foaf:weblog <http://www.deelan.com/> .
Jul 18 '05 #2
deelan <gg*@zzz.it> wrote in message news:<6l***********@news1.interplanet.it>...
Jakub Fast wrote:
Does anybody know how far you can get nowadays with trying to use Python
as the script language for XUL instead of JS? Is it possible (even
theoretically) to write full-fledged applications on the Mozilla
platform with python only?


yeah, theoretically is it possible by using PyXPCOM:
<http://aspn.activestate.com/ASPN/Downloads/Komodo/PyXPCOM/>


Isn't using JavaScript the only way to call XPCOM objects from XUL? I
was aware of PyXPCOM, I was just wondering whether it was possible to
get rid of JavaScript altogether...

Kuba
Jul 18 '05 #3
It might be a good idea if a Python module were created that
supported XUL (whether based on the Mozilla, Luxor, Microsoft XAML
dialect or its own, presumably improved and more pythonic, one)
for GUI creation that was directly importable ala Tkinter or PyGtk.
This will probably run on top of (in order of preference):

a) straight Xlib (in the case of *nix) and Win32 GDI calls (and
in Longhorn and beyond, Avalon subsystem calls) so as to cut
the proverbial gordian knot of layers.

b) [Py]Gtk or [Py]Qt

c) Tkinter (with all those layers, this might result in a UI
that responds even more slowly than Mozilla)

Further, we might even want to do away with, or have an alternative
Python syntax, for XUL in the spirit of the XUL Compact Syntax
(see http://xul.sourceforge.net/compact.html )

For me, it all depends on how difficult it is to get Python to
integrate with XPCOM/Mozilla gracefully the way Javascript already
does today. (Seeing as how Blackwood - Java<-->Mozilla integration -
has stalled, is JNI to blame or would the difficulties also apply
to Python<-->Mozilla integration?)

[ If it cannot be made to work as simply and straightforward as
calling Javascript today (via onXXXevent='' attributes), then
I don't see much of an advantage with this approach. Otoh, if
it can be made so, then MozPy (and PyMoz - turns out there is
such a thing!) would truly rock as in addition to XUL scripting,
we would actually be able to create DHTML/DOM pages which we
can client-side script via Python instead of the much hated
Javascript. ]

We would rather not reinvent wheels... In fact, if you think about
it, XPCOM is a platform with a widget set/layout engine (with
NSPR - Netscape Portable Runtime - as the OS functionality layer)
that's a reinvention of what Gtk and Qt already do (and to a big
extent Python, with all of its modules, is its own platform too!)!
The difference with Mozilla vs Gtk/Qt is that it doesn't seem that
they are offering their widget set for 'imperative' use (i.e. use
programming language calls to create widgets), rather it's totally
declarative (via XUL).
Jakub Fast wrote:
Hi,

Does anybody know how far you can get nowadays with trying to use Python
as the script language for XUL instead of JS? Is it possible (even
theoretically) to write full-fledged applications on the Mozilla
platform with python only?

In a parallel vein, anybody know what the architecture of Komodo is?

Thanks for any pointers, information, etc

Kuba

PS. Yes, I have seen the recently-publicized wishlist for Mozilla 2 and
I have tried to run MozPython in M1.7 or F0.9, and failed miserably. I
have been trying to dig through the Mozilla docs to find anything I
could infer this information from, but it seems that the amount of
mozilla docs that "might contain some hidden clues" piling up in front
of me is neverending...

Jul 18 '05 #4
Hi Jakub,
yeah, theoretically is it possible by using PyXPCOM:
<http://aspn.activestate.com/ASPN/Downloads/Komodo/PyXPCOM/>
Isn't using JavaScript the only way to call XPCOM objects from XUL? I
No, pyXPCOM does it, too.
was aware of PyXPCOM, I was just wondering whether it was possible to
get rid of JavaScript altogether...


Currently you'll have to use JavaScript to let the XUL forms react to
user's input etc., it's not possible to replace JavaScript with Python
(currently).

Best regards,
Lars
Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nicola Larosa | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ladies and gentlemen, the snake bot: Robot spy can survive battlefield damage http://www.newscientist.com/news/print.jsp?id=ns99994075 ...
0
by: melledge | last post by:
Mozilla Foundation Co-Hosts Europe's Leading XML and Web Developer Conference XTech 2005 Conference to Bring Together XML and Web Technology Thought Leaders
1
by: A Mackie | last post by:
Service Oriented Architecture (SOA) - a great new paradigm, or just this years marketing snake-oil for middleware vendors ? Now don't get me wrong, integration of loosely coupled web-services...
9
by: Tomi Lindberg | last post by:
Hi, With the following function definition, is it possible to create an instance of class C outside the function f (and if it is, how)? And yes, I think this is one of those times when the real...
8
by: seberino | last post by:
I'm semi-seriously wondering if snake jokes are valid in the Python community since technically, Python came from Monty Python, not slithery animals. Problem is I don't know that anyone born...
1
by: Xah Lee | last post by:
Of interest: $B!V(B... what society overwhelmingly asks for is snake oil. Of course, the snake oil has the most impressive names --otherwise you would be selling nothing-- like "Structured...
13
by: anthony | last post by:
I'm creating a report that will present information split into several sections with each section dealing with a particular aspect of data. No problem there. However, one of the sections will...
19
by: foolsmart2005 | last post by:
I have written a snake game. There are 2 levels in the game(I finished 1st level). It can run in VC++ without problem but, when I run it on the dev C++ 4.9.9.2, it cannot run. I want to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.