Use lys as Python interpreter
Use Python interpreter
After starting lys, you see the main window.

Click “Show” button at the bottom-right edge to show the command log.

Type the command below in the text box at the bottom:
print("Hello, lys")

You see the “print” command is executed as Python command.

It’s done! You can execute all Python commands from the Python interpreter in lys.
Define new function
Next, let’s try to define new function and execute. Press Ctrl+P to open proc.py file.

Define function below and Press Ctrl+S to save the contents:
def add(value): return value + 1
It is saved as “./module/proc.py”.

Type the code below to execute “add” function from the command line (You see “Result: 4”):
print("Result:", add(3))

It’s done! You can define arbitrary function and class in proc.py file. If you want to understand what is done for detail, see Understanding shell in lys
Now you can do everything that Python can do in lys. Go to next step(Display graphs in lys)