Running Python* on Intel® Edison

Version 1

    Python* and Vi Text editor are included in the Linux* image running on the Intel® Edison. In this document we will be doing a simple Hello World Python script via the Linux console.

     

    First run the following command to create a file with the Vi Text Editor.

    vi helloworld.py

     

    In the terminal you should see the following.

    vi editor.PNG
    Type the following two commands into the helloworld.py file. Once inside the vi editor type “i” to start typing.

    #!/usr/bin/python
    print "Python running on Intel Edison!"

    Once the python script has been typed hit “Esc” on your keyboard and typing :wq to save the file.

    To run the python script type the following command.

    python helloworld.py

    If your python script ran successfully you will see the following output.

    python running.PNG