Results 1 to 2 of 2

Thread: smallutils - plugin

  1. #1
    V.I.P oldfart's Avatar
    Join Date
    Oct 2008
    Posts
    1,488
    Thanks
    159
    Thanked 422 Times in 246 Posts

    smallutils - plugin

    I have (slightly) modified one of emanual's tutorials.
    It presents a menu (you can add/change) the entries
    it then calls a system command and outputs the results to the 'command' window.
    the command window size is fixed by the skin you are using - don't know how to make it bigger - you can play!!

    download the rar
    create a directory called smallutils inside
    /usr/lib/enigma2/python/Plugins/Extensions
    put the 3 files in that directory
    chmod 644
    restart gui (this puts the plugin into the plugins menu)

    modify the code as you want:-
    to do that, you edit the plugin.py file
    delete the two .pyo files in the /usr/lib/enigma2/python/Plugins/Extensions/smallutils directory
    restart gui

  2. The Following User Says Thank You to oldfart For This Useful Post:

    zeros (07-09-2012)

  3. #2
    V.I.P oldfart's Avatar
    Join Date
    Oct 2008
    Posts
    1,488
    Thanks
    159
    Thanked 422 Times in 246 Posts
    this is the bit that creates the menu
    Code:
    	list = []
    		list.append(("netstat", "com_one"))
    		list.append(("drive space", "com_two"))
    		list.append(("mount", "com_three"))
    		list.append(("free memory", "com_four"))
    		list.append((_("Exit"), "exit"))
    with corresponding actions for the list entries:-
    Code:
    if returnValue is not None:
    			if returnValue is "com_one":
    				self.prompt("/bin/netstat -lant")
    				
    			elif returnValue is "com_two":
    				self.prompt("/bin/df -h")
    					
    			elif returnValue is "com_three":
    				self.prompt("/bin/mount")
    				
    			elif returnValue is "com_four":
    				self.prompt("/usr/bin/free")
    so if you select the second entry, 'value' is com_two
    so now the returnValue is com_two and that piece of code is executed; and so on ...

  4. The Following User Says Thank You to oldfart For This Useful Post:

    zeros (07-09-2012)

Similar Threads

  1. Which EPG plugin?
    By folky in forum AZBox Premium Discussion
    Replies: 1
    Last Post: 09-07-2011, 01:19 PM
  2. Sky UK EPG plugin
    By oregon in forum Dreambox DM500HD
    Replies: 3
    Last Post: 09-08-2010, 08:42 PM
  3. MV EPG 3.5.4 plugin
    By massimo1167 in forum AZBox HD Newbie Questions
    Replies: 29
    Last Post: 17-01-2010, 12:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •