Instructions

Follow these steps in order. Each one takes a few minutes.

Step 1: Install Python

  1. Open python.org/downloads and download the Windows installer.
  2. Run it. Choose Customize installation.
  3. Tick tcl/tk and IDLE (needed for windows and games).
  4. On the next screen, choose Install for me only.
  5. Finish the installation, then close any open Command Prompt windows.

Step 2: Run the setup wizard

  1. Download {{SETUP_NAME}}. Optionally check it with the checksum tool first.
  2. Double-click the file and follow the pages: Welcome, Licence, folder, Install, Finish.
  3. Leave Start SaiLang IDLE ticked and click Finish. SaiLang IDLE opens.

The wizard adds SaiLang IDLE, a SaiLang Prompt and an Uninstall entry to the Start Menu, and a SaiLang IDLE icon on your desktop. It installs for your user account only.

Step 3: Open SaiLang IDLE

Double-click the SaiLang IDLE icon on your desktop, or open it from the Start Menu. The SaiLang editor opens.

The setup wizard makes .sai files open in SaiLang IDLE automatically. Double-click any .sai file to open it.

Step 4: Write your first program

  1. In IDLE choose File > New.
  2. Type:
    make name = ask("What is your name? ")
    say "Hello,", name
  3. Choose File > Save As and save it as hello.sai.
  4. Press F5, type your name in the Program input box, and press Enter.

Alternative: the Command Prompt

Open Command Prompt in the SaiLang folder and run:

set PYTHONPATH=src
python -m sailang examples\hello.sai
python -m sailang                  (starts the prompt)
python -m sailang check hello.sai  (checks without running)

The set line lasts for one Command Prompt window, so run it again in each new window.

Windows and games

The examples desktop_app.sai, image_viewer.sai and coin_collector_game.sai open windows. Run them with F5 in IDLE. Closing the window ends the program.

Troubleshooting

"Python was not found" or Windows opens the Microsoft Store
Install Python from python.org as in Step 1. Then turn off the python "App execution alias" in Settings > Apps > Advanced app settings > App execution aliases.
Windows or games do not open, and an error mentions Tkinter
Run the Python installer again, choose Modify, and tick tcl/tk and IDLE.
Double-clicking a .sai file does nothing
Run the setup wizard again so that it sets up the file association, or right-click the file, choose Open with, and pick SaiLang IDLE.
Smart App Control blocks SaiLang-Setup or the SaiLang programs
SaiLang's Windows programs are not yet digitally signed, so Smart App Control may stop them. Use the source ZIP instead. Extract it, open Command Prompt in the folder, and run set PYTHONPATH=src then python -m sailang idle. Windows allows Python itself to run.
A file was saved as hello.sai.txt
In Save As, set "Save as type" to All Files, or rename the file and remove the .txt.
An error names a line number
The message shows the file and line. In IDLE that line is highlighted in red. Read the message: it says what SaiLang expected.
Text shows strange characters
Save the file as UTF-8 (the IDLE save button does this for you).