basic engima2 ping example not working

  • Hi, i have written programs in python before but it seems that when i try running some on my DB 8000 it doesn't like some of the functions in which i am using. I tried to create a simple ping plugin for my own testing use and it works when i try it on winpython but when i put it onto the dreambox it comes up with a blue screen everytime i run that part of the plugin.


    Basically everytime the user presses the blue button the following is to be called:
    (the code below actually does get called)





    Ok excuse the bad indentation there, the file is properly indented but that is what is called when the blue button is pressed. If i remove that code from my plugin, the plugin will compile and load properly on the dreambox, so why does my ping code not work? Does the dreambox not like import subprocesses or something? If not how could i go about doing a basic ping example on a dreambox? I'll have to get used to knowing which functions work on a dreambox and which don't from my normal way of programming within the language.


    Thanks

    Dreambox 8000 with 1TB Western Digital Internal Hard Drive, 80cm Dish, Quad LNB, 1.2 Compatible Motor, Yamaha RX-765 Amplifier, Two Tannoy Custom F1 Speakers, Tannoy FC Custom Centre Speaker, Two Tannoy Custom FR Speakers, EPOS ELS Sub Woofer, Porty TV

    2 Mal editiert, zuletzt von Sharkadder ()

  • ok i am struggling to get what is going on there with that container, i am assuming that econsole allows you to display a console window inside a container, is this correct? I then assume i type the commands i wish to use within this window and then they execute yes?


    I saw a testplugin of a file browser, i am assuming that i can look at this and change the code for the dir command for a ping command or something. This is just for my practice, it's so i can get used to how enigma2 works from general linux programming.

    Dreambox 8000 with 1TB Western Digital Internal Hard Drive, 80cm Dish, Quad LNB, 1.2 Compatible Motor, Yamaha RX-765 Amplifier, Two Tannoy Custom F1 Speakers, Tannoy FC Custom Centre Speaker, Two Tannoy Custom FR Speakers, EPOS ELS Sub Woofer, Porty TV

  • "when i put it onto the dreambox it comes up with a blue screen everytime i run that part of the plugin"


    Do you get a crashlog in /media/hdd ?


    If so - it should explain what the error is.

  • ok it says in the crash log that no module is called subprocess, but when i run it on windows or linux it shows that they is a module called sub process. Do you think it could be to do with the version of python in which i am using? Here i use python 2.6, any idea why that code works on a pc but not dream? Is they a list of modules which work on dreambox anywhere?


    Anyways here is the relivent part to what the crashlog tells me:


    Code
    action ->  ColorActions blue
    Traceback (most recent call last):
      File "/usr/lib/enigma2/python/Components/ActionMap.py", line 46, in action
    	res = self.actions[action]()
      File "/usr/lib/enigma2/python/Plugins/Extensions/Testing/plugin.py", line 417, in ping
    	import subprocess
    ImportError: No module named subprocess

    Dreambox 8000 with 1TB Western Digital Internal Hard Drive, 80cm Dish, Quad LNB, 1.2 Compatible Motor, Yamaha RX-765 Amplifier, Two Tannoy Custom F1 Speakers, Tannoy FC Custom Centre Speaker, Two Tannoy Custom FR Speakers, EPOS ELS Sub Woofer, Porty TV

  • thanks man, i'll look into how that works. I sent you a pm by the way which you may find interesting.

    Dreambox 8000 with 1TB Western Digital Internal Hard Drive, 80cm Dish, Quad LNB, 1.2 Compatible Motor, Yamaha RX-765 Amplifier, Two Tannoy Custom F1 Speakers, Tannoy FC Custom Centre Speaker, Two Tannoy Custom FR Speakers, EPOS ELS Sub Woofer, Porty TV