How to catch python consol comunicate

  • Hi


    I' m adapting some python console program to Enigma (use console classes in enigma program).


    I want to show cli program communicates on TV as message or other is it possible to catch python comunicate and show it on screen.



    In exaple in python CLI commands can give answer:
    >>> subtitle_database=subtitles.process(file1,['pl'])
    ERROR:root:Open subtitles could not be contacted for login


    albo:
    >>>subtitleFile = subtitles.createFile(subtitle_database[0],file1)
    HTTP Error: 500 http://www.opensubtitles.org/en/download/file/1952861357.gz


    So I want to catch this answer and shot it as message box.

    "Reasonable people adapt themselves to the world.
    Unreasonable people attempt to adapt the world to themselves.
    All progress, therefore, depends on unreasonable people"


    ============
    SubsDownloader

    Einmal editiert, zuletzt von silelis ()

  • For debugging just stop enigma2 via init 5 and then run it manually via console...


    Then all those outputs are shown in your telnet/ssh session.

    so long
    m0rphU