And Now for Some Programming?(Compact)

Perhaps you come to the stage when you need a special solution and have to write you own programme. If it’s something you’ve always been looking forward to and now finally have the chance, then we probably won’t be able to show you anything new in this chapter. If the subject is full of mysteries, then don’t go away. In this chapter, we will lift the veil still covering the topic.

You’ll find out how easy it is to write a little programme.

All you need is:

  • Your RevPi Compact
  • Monitor
  • Keyboard
  • Mouse

Let’s go!

  • Start RevPi Compact.
  • Log-in.
  • Change to the graphic user interface. Enter “startx” in the command line.
  • Click on the “Menu“ button.
  • Select “Programming“.
  • Click on “Phyton 3“.

The Python shell opens. You can write and perform commands in the shell.

screen1a
  • Click on “File”
  • Click on “New Window”
screen2

 

Python Editor opens. You can write commands in Editor.

screen3
  • Write the following command: print (“Hello World!”).
screen4
  • Click on “File>Save”.
  • Save the file under the name “hello.py”.
screen6

 

That’s all there is to it. No sweat. You can already run the programme.

  • Now click on “Run>Run Module”
screen7

In Python Shell you will now see the “Hello World” output.

screen8

You can naturally do a whole lot more with Python than only emitting text. If we’ve been able to arouse your interest a little in the topic, you can find further information about Python at: https://www.python.org/doc/.