473,770 Members | 3,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

firefox python plugin

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
Jul 18 '05 #1
2 3868
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

Jul 18 '05 #2
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
Jul 18 '05 #3

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

Similar topics

0
1739
by: Hugh Macdonald | last post by:
I've got a slight problem... and I'm stuck as to where to go with it... I'm running on Redhat7.2, using Python 2.2.2 I've got a compiled module that I wrote almost a year ago - it works fine, and I've never had any problems with it... I also did an extension to a plugin (Shake) using Python, so the plugin loads a python module and calls various functions in there.... all in all, fine - I thought I had my head around the system, and...
9
2457
by: Tian | last post by:
I am writing an audio game using Python. in this game you can apply some sound effects for the clips you have recorded. I want to make this function extensible. I want user to be able to add new sound effect plug-ins in the future. I want the plug-in to be a simple python code (text file) and a description file. I will set some rules for plug-in writing (like you must inherit some class and implement some method). I hope plugin can be...
0
1338
by: bruce | last post by:
hi... this probably isn't the correct mailing list, but we're giving it a shot!! does anyone have any ideas as to how to go about creating a plugin/toolbar for both/either the IE/Firefox browsers? We're curious as to how to do this, and what languages/technologies you'd use to do this.. could it be done in python???
3
4841
by: Philip | last post by:
I have just tried my website with Firefox v1.0 and when I try to load a movie using: document.getElementByID('MovieID').LoadMovie(0, 'MovieURL'); the browser tells me that LoadMovie is not a recognized function. This works fine on IE6. I need to change the movie depending on the buttons that the user presses, all on the same page. Is the only way to do this by changing the innerHTML of the 'MovieID'
0
1582
by: autogoor | last post by:
I want to put a java Applet in a jsp page. Here is what I used: <jsp:plugin type="applet" code="mypackage.myApplet" width="450" height="350" > <jsp:params>...</jsp:params>
2
9520
by: Blondie21 | last post by:
Hi, I have a .jsp file in the following format: .... html headers, jsp code, html code... <jsp:plugin type="applet" code="path.in.packet.appletclassname.class" codebase=".." jreversion="1.5"
4
9790
by: J.Marsch | last post by:
Does anyone know of an example or a document describing how to write a plug-in for Firefox in C#? As I understand it, Firefox uses the same plug-in model as Netscape, so if perhaps a Netscape example would do as well.
2
8780
by: zelegolas | last post by:
Hi, It's may be a stupid question but do you if someone tried to create a python plugin for firefox? If you know an Open Source project let me know... Thanks
3
9056
by: Scott | last post by:
I have a requirement to control a firefox web browser from an external python program. The python program running under linux from a command shell needs to first find all open firefox web browser windows read the URL currently displayed in each web browser and if the URL matches a particular regular expression it needs to get/set form fields displayed in the web browser. Basically I need something like Windows COM and Internet Explorer...
0
9591
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10057
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10002
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9869
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6676
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3575
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.