python applets?

  • Thread starter =?ISO-8859-1?Q?Andreas_R=F8sdal?=
  • Start date
?

=?ISO-8859-1?Q?Andreas_R=F8sdal?=

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.
 
D

Dave Brueck

Andreas said:
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
 
D

Doug Holton

Andreas said:
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.
 
R

Russell E. Owen

Doug Holton said:
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
 
T

Thomas Guettler

Am Wed, 02 Jun 2004 16:49:49 -0700 schrieb Russell E. Owen:
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
 
T

Thomas Guettler

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
 
D

Doug Holton

Russell said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top