LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-27-2005, 08:43 PM   #1
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
writing a freevo plugin


This is more freevo specific then python specific. If any of you have written any plugins for freevo maybe you can see what I am doung wrong.
below is my code
Code:
#!/usr/bin/env python
#
# this is my first attempt to make a freevo plugin

import os
import plugin
import config

class PluginInterface(plugin.ItemPlugin):
    """
    this is a test plugin to see if I can add a command to the menu
    """
    def __init__(self):
        plugin.ItemPlugin.__init__(self)

    def actions(self, item):
        return [ (self.test_command, "shane's command") ]

    def test_command(self):
        item = self.item
        os.system('touch %s'%item.filename)
I am getting this error in my freevo log

Code:
    action( arg=arg, menuw=self )
  File "/usr/lib/python2.4/site-packages/freevo/menu.py", line 87, in select
    self.function(arg=self.arg, menuw=menuw)
TypeError: test_command() got an unexpected keyword argument 'arg'
any suggestions would be appreciated
 
Old 11-27-2005, 10:31 PM   #2
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Original Poster
Rep: Reputation: 30
I figured out what I was doing wrong. I did not have self.item set to any thing

I changed that code from this
Code:
def actions(self, item):
        return [ (self.test_command, "shane's command") ]
to

Code:
def actions(self, item):
        self.item = item
        return [ (self.test_command, "shane's command") ]
freevo is great, it makes adding feature very easy. I now should be able to add my python script that makes mplayer conf files to crop avi files
 
Old 12-07-2005, 06:31 PM   #3
phishman3579
Member
 
Registered: May 2003
Posts: 161

Rep: Reputation: 32
If you have any questions, I have alot of experience with Freevo plugins. I am starting a help page specifically for Freevo. http://freevohelp.com
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
freevo metusnon Linux - Software 2 05-23-2004 12:28 PM
Flash Plugin in Opera 7.11. Not showing up on plugin list even. binarynova Linux - Software 4 02-05-2004 07:21 AM
Freevo DBZForever456 Linux - Software 0 09-24-2003 05:38 PM
Freevo mikel Linux - Hardware 6 04-14-2003 04:26 PM
cd writing software which supports multisession writing jayakrishnan Linux - General 3 03-24-2003 05:51 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:25 PM.

Contact Us - Advertising Info - Rules - Privacy - Donations - Contributing Member - LQ Sitemap - "Weather apps tell you it'll rain. Wyndo tells you when to go."
Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions