2023 May 15
Monday evening

A tradition

People have been writing 'Hello, World!' programs since about 1972. The object was to get a potentially complicated setup to do something simple.

When you see 'Hello, World!' on the screen, you can be reassured that you've figured out the correct compiler flags and now you can go and have some lunch.

Fast forward to 2023. In Python the equivalent is literally print("Hello, World!"). But it is worth starting here. After this quick exercise, you'll have achieved these important steps:

Install Python

On Linux

Use the software manager to install the following packages:

  • python3
  • python3-pip

On Windows

Create a Virtual Environment

Use the App menu to open a terminal. If necessary, cd to your home directory.

Run this command:

python3 -m venv py3

Install Balladeer

On Linux:

py3/bin/python -m pip install balladeer

On Windows:

py3\Scripts\python.exe -m pip install balladeer

First line of dialogue

Use the App menu to launch a Text Editor. Type in the following code.

from balladeer import Dialogue

d = Dialogue("Hello, World!")

Save the file as in your home directory.

Execute your code

Go back to your terminal window.

On Linux:

py3/bin/python -m main

On Windows:

py3\Scripts\python.exe -m main

Here's what you should see:

Hello, World!

And after Lunch

It's fun to play at adding extra dialogue. But don't hang around here too long. Your next step is on the Balladeer blog.

Comments hosted at Disqus