By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,024 Members | 2,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,024 IT Pros & Developers. It's quick & easy.

python applets?

P: n/a
Hi,

Is there such a thing as python applets for web browsers? (eg. such as
java applets?) I think that could be useful.

Andreas R.
Jul 18 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Andreas wrote:
Is there such a thing as python applets for web browsers? (eg. such as
java applets?) I think that could be useful.


A Google search for "python applets" turned up about 190,000 results. A Google
search for "python applets for web browsers" turned up about 69,000 results.
Finally, a Google search for "python applets for web browsers? (eg. such as
java applets?)" turned up about 8,700 results.

HTH,
Dave
Jul 18 '05 #2

P: n/a
Andreas Røsdal wrote:
Hi,

Is there such a thing as python applets for web browsers? (eg. such as
java applets?) I think that could be useful.


No, there was a web browser project called Grail that allowed python
applets, but it is was abandoned.
I think the main issue is security. Right now there is no official way
to restrict what a python program can and cannot do, such as delete a
file on the hard drive.

One thing you can do in Python that you cannot in Java however is embed
a user's web browser (such as Internet Explorer or Mozilla) in your
Python program. In some cases that is more desirable.
Jul 18 '05 #3

P: n/a
You might want to take a look at:

http://grail.sourceforge.net/

http://www.modpython.org/

Larry Bates,
Syscon, Inc.

"Andreas Røsdal" <an******@stud.ntnu.no> wrote in message
news:Pi*******************************@jaguar.stud .ntnu.no...
Hi,

Is there such a thing as python applets for web browsers? (eg. such as
java applets?) I think that could be useful.

Andreas R.

Jul 18 '05 #4

P: n/a
Andreas Røsdal wrote:
Hi,

Is there such a thing as python applets for web browsers? (eg. such as
java applets?) I think that could be useful.

Andreas R.


There is an example here:

http://www.jython.org/docs/jythonc.html

Good luck,
Ype
--
email at xs4all.nl
Jul 18 '05 #5

P: n/a
In article <Jd********************@comcast.com>,
Doug Holton <in****@spam.here> wrote:
Andreas Røsdal wrote:
Hi,

Is there such a thing as python applets for web browsers? (eg. such as
java applets?) I think that could be useful.


No, there was a web browser project called Grail that allowed python
applets, but it is was abandoned.
I think the main issue is security. Right now there is no official way
to restrict what a python program can and cannot do, such as delete a
file on the hard drive.

One thing you can do in Python that you cannot in Java however is embed
a user's web browser (such as Internet Explorer or Mozilla) in your
Python program. In some cases that is more desirable.


How do you do that?

I've been using the webbrowser module to open help files for my python
application, but it has several problems. If the user already has their
browser open in another "desktop" (unix users seem fond of switching
between lots of desktops), then the help opens there instead of the
"desktop" that has the current app. Also, I really need to call
webbrowser in a thread, because it takes forever if the web browser
isn't already open. (Also, it's not safe to ask for file://...#anchor
urls; some OSs handle it, others do not. I ended up writing code that
retries without the anchor.)

-- Russell
Jul 18 '05 #6

P: n/a
Am Wed, 02 Jun 2004 16:49:49 -0700 schrieb Russell E. Owen:
One thing you can do in Python that you cannot in Java however is embed
a user's web browser (such as Internet Explorer or Mozilla) in your
Python program. In some cases that is more desirable.


How do you do that?

I've been using the webbrowser module to open help files for my python
application, but it has several problems. If the user already has their
browser open in another "desktop" (unix users seem fond of switching
between lots of desktops), then the help opens there instead of the
"desktop" that has the current app. Also, I really need to call
webbrowser in a thread, because it takes forever if the web browser
isn't already open. (Also, it's not safe to ask for file://...#anchor
urls; some OSs handle it, others do not. I ended up writing code that
retries without the anchor.)


There is a module called webbrowser in the
standard library. It opens the default browser.
But it does not embed it into an other GUI.

Regards,
Thomas
Jul 18 '05 #7

P: n/a
Am Wed, 02 Jun 2004 21:43:40 +0200 schrieb Andreas Røsdal:
Hi,

Is there such a thing as python applets for web browsers? (eg. such as
java applets?) I think that could be useful.


Yes, this would be useful if it would exist (see other replies)
and if all browers would have this plugin.

If you are doing an intranet solution, you can create
your own GUI talking e.g. xml-rpc with the server.

Regards,
Thomas

Jul 18 '05 #8

P: n/a
Russell E. Owen wrote:
In article <Jd********************@comcast.com>,
Doug Holton <in****@spam.here> wrote:

Andreas Røsdal wrote:
Hi,

Is there such a thing as python applets for web browsers? (eg. such as
java applets?) I think that could be useful.


No, there was a web browser project called Grail that allowed python
applets, but it is was abandoned.
I think the main issue is security. Right now there is no official way
to restrict what a python program can and cannot do, such as delete a
file on the hard drive.

One thing you can do in Python that you cannot in Java however is embed
a user's web browser (such as Internet Explorer or Mozilla) in your
Python program. In some cases that is more desirable.

How do you do that?


You can use your platform's native component architecture (ActiveX,
Kparts, or Bonobo) from Python to embed (or create) controls like a web
browser, PDF viewer, or a multimedia player.

In Windows, you can embed Internet Explorer in wxPython using ActiveX,
see the wxPython demo. In Linux (and hopefully other platforms in the
future), you can embed Mozilla in wxPython, see wxMozilla:
http://wxmozilla.sourceforge.net/
Also in Linux, I believe you can embed the Konqueror browser or any
other Kparts compatible things using PyQT and PyKDE, but I'm not 100%
sure about that.
Lastly, I'm not sure if you can do similar things using PyGTK and
Bonobo: http://www.pycage.de/howto_bonobo.html
Jul 18 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.