Python 3 script in LibreELEC 10

  • Well, I took a stab at modifying the wrapper script that is posted in this thread. Here is what I tried:

    New file named testwrapper.sh

    Bash
    #!/bin/sh
    PYTHONPATH=
    for addon in /usr/lib/python*/site-packages/Crypto /storage/.kodi/addons/*/lib /storage/.kodi/addons/*/libs /usr/lib/kodi/addons/*/lib; do
      [ -d "${addon}" ] && PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${addon}"
    done
    export PYTHONPATH
    exec /usr/bin/python "$@"

    I confirmed that does seem to be the location of cryptography but maybe it needs to point to a specific subdirectory or file in that directory or maybe my "stab" was all wrong?

    This is what I get

    This would be really cool as cabernet (https://cabernetwork.github.io/) allows one to merge M3u lists and xml files by way of a web GUI and has some built in sources like xumo and pluto. Also it could probably work with the ffmpeg addon (as I recall there is one???) to proxy problematic sources. Not just useful for simple IPTV client but any PVR back-end.

    It could easily be installed into the addons folder and run from there I would think.

    As I recall there is (or was) an addon that among other things could run a script at starup but not finding it in current list of addons, so would have to start in autostart.sh . It would literally need nothing else other than cryptograpy and the existing GUI could serve as the interface.

    Edited once, last by tekno (July 9, 2022 at 12:30 PM).

  • No than ks on the docker, I have tried that too much overhead on my little LE system. I think both these packages are set up for docker just that it seems to resource intensive for a docker instance for everything you want to run. Better that I just run it elsewhere.

    Not sure why everyone is so bent on running "another docker instance" to make something work. Must be nice to have a powerful CPU with memory to spare everywhere.

  • In case anyone has any idea, I am getting this message when running a new script.

    Code
    Error Contents: No module named html
    Traceback stuff with the failed lines
    ImportError: No module named html

    Which addon may have such a library?

    ---edit

    Nvm, it is a lib that comes with python3 and I tried to execute the script on python2 (on le 9), thus the error.

    I need to stop doing stuff before 8am :P

    Edited once, last by jim_p (July 16, 2022 at 5:47 AM).