Search code examples
pythonraspberry-pixbmc

How do you run a python script in OpenElec


I've looked all over but can't find a straight answer. I've got OpenElec installed on my raspberry pi B+ and I want to start playing around with some script.

Which Directory do you put the files in and where do I go in OpenElec to run the python scipt?

cheers!!


Solution

  • 1. Connect to your Raspberry Pi with SSH:
    $ ssh [email protected](IP)
    password: openelec
    
    2. Check
    # python
    Python 2.7.3 (default, Mar 31 2015, 22:10:50) 
    [GCC 4.9.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> exit()
    
    3. Write
    # nano myScript.py
    

    Or edit your script with your beloved IDE on your PC directly via net protocole (ftp, samba,..) like I'm doing with my Banana Pi.

    Bear in mind for some external python modules you should include them before compiling OpenElec from source, or crosscompile if they're binaries, see.