Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > firefox python plugin

Reply
Thread Tools

firefox python plugin

 
 
M.N.A.Smadi
Guest
Posts: n/a
 
      03-08-2005
hi;

i want to write a script to do the following:
when using firefox to download a textfile, instead of saving it to the
hard dist, i want to run a python script on it, and i want the python
script then to prompt me for the location where i want to store the
processed downloaded file

any help is appreciated
thanks
m.smadi
 
Reply With Quote
 
 
 
 
Carl Banks
Guest
Posts: n/a
 
      03-08-2005
M.N.A.Smadi wrote:
> i want to write a script to do the following:
> when using firefox to download a textfile, instead of saving it to

the
> hard dist, i want to run a python script on it, and i want the python


> script then to prompt me for the location where i want to store the
> processed downloaded file


I can't help you with details, but here's some general tips:

First, although you say "plugin", I think what you really want is an
extension. A plugin is kind of a DLL that can view certain embedded
content in a page, whereas an extension is . Extensions are more
versatile and easier to program.

Second, the de jure official language of Firefox extensions is
Javascript, and you might want to consider writing the script in that
(if you intend to have but haven't yet written it). It's surprisingly
not a bad language.

But if you need Python, the most straightforward thing to do is write a
small wrapper extension that starts the Python interpretter to do the
dirty work. The dialog box may be easier done in the extension itself
and not in Python subprocess.

For details, google for tutorials on writing Firefox extensions.

--
CARL BANKS

 
Reply With Quote
 
 
 
 
Thomas Ganss
Guest
Posts: n/a
 
      03-09-2005
M.N.A.Smadi schrieb:
> hi;
>
> i want to write a script to do the following:
> when using firefox to download a textfile, instead of saving it to the
> hard dist, i want to run a python script on it, and i want the python
> script then to prompt me for the location where i want to store the
> processed downloaded file

clientside processing could either be done in javascript (possibly
disabled on some machines <g>) or in jython running as an applet.
Storing processed data could be considered quite dangerous <BG>. You
have to consider security settings / sandbox approaches here.

Unless it is a specific issue for most use cases creating the processed
file on the server and offering a link to download would be a better
solution...

HTH

thomas
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python plugin for Firefox zelegolas Python 2 04-17-2008 07:28 PM
Eclipse Plugin: how to modify perl build path from an eclipse Plugin java class eser@libero.it Java 1 09-07-2007 09:45 PM
Getting reference of eclipse plugin view or its component from another eclipse plugin view? Jimmy Java 0 03-15-2007 11:04 PM
tomcat-maven-plugin problem - mvn is looking for org.apache.maven.plugins:maven-tomcat-plugin Marcin Cenkier Java 1 04-12-2006 08:00 PM
Detect if Sun plugin is installed (in IE) EVEN if not set as default in plugin? PilotYid Java 1 10-31-2005 11:13 AM



Advertisments