CMSC 201

Lab 1: Introduction to Unix and Emacs

Today's Assignment

We will go over writing a Python program using Emacs and executing it in more detail in next week's lab. For now, here are the basic steps to writing your first program.

Change into your 201 directory:
cd
cd 201
On the command line type:
emacs helloworld.py &
In the emacs editor type:
print("Hello world!")

Then press CTRL-X + CTRL-S to save then CTRL-X + CTRL C to exit.

Now that you have written the Python program it is time to run/execute it. On the command line first type:
scl enable python33 bash

This is important as it will tell the gl server which version of python to execute. You must enter this command every session in which you intend to run python. Once you've done that, type:

python helloworld.py