Introduction to Python Programming

From Crowfly

Jump to: navigation, search


Log in

Log into a Unix computer. See your Systems Administrator for instructions. It might look like this:

  ssh [email protected]

First Program

The Hello World Program.

The Editor

Using an editor, like nano or another editor, create a new file called that contains the following:

print "Hello, World"

You can do that like this:


This will open up the nano editor.

Then type: print "Hello, World." and [ENTER]

Then, as indicated at the bottom of the screen, type

 Control-X   to Exit Editor
 Y  - to say Yes to saving the file,
 [Enter] - to keep the same name of the file

Using Files

To see our new file type


or using the -l for long format:

ls -l

To see all files, type

ls -l *

The * is a wildcard.

Using Directories

Make a special python subdirectory

mkdir python

Move your hello world program into the directory

mv python

Go into the new directory

cd python

See where you (print working directory)


See your files

ls -l

Runing Programs


Your program should display the words: "Hello, World."


Do Assignment 4

See, also

Personal tools