If you want to try out a python program do the following (we will do something like this in class on Wednesday, so if you do not get through this, that is okay):
% cd % cd cs21 % mkdir class % cd class % pwd
% mkdir week01 # do this from your cs21/class subdirectory % cd week01 % pwd
def main(): print "hello there!" main()
% python hellothere.py hello there! %you can also run this program on the python interpreter in interactive mode:
# runs hellothere.py in interactive mode: % python -i hellothere.py >>>>>> is the python interpreter prompt, at this prompt you can enter other python code that the interpreter will interpret:
>>> print "hello, who are you?"To exit the python interpreter hold down the control and the D keys together (CNTL-D)
you can also just start the python interpreter in interactive mode without giving it a python code file to run:
% python >>>