Please send questions to
st10@humboldt.edu .
#! /usr/bin/python
# show_guts.py
# show the first line in a file named file1
#
# you can run this at the UNIX/Linux command-line by typing:
# cs-server> python show_guts.py
#
# if you make me executable, you can leave off the python:
# cs-server> chmod 700 show_guts.py
# cs-server> show_guts.py
#
# (heck, you could import it into a python interpreter session
# to run it --- *once* during that session, anyway... 8-)
# >>> import show_guts
#
# tries to show the first line in a file named 'file1' in the
# directory where this script is RUN ... not where it
# necessarily "resides"
input = open('file1', 'r')
for line in input:
print "<" + line + ">"
input.close()