File Handling - Some Help Needed

Alan Sandercock (acsander@csat.gatech.edu)
13 Apr 1995 20:14:55 GMT

Here is a rather simple question and I almost fell embarrassed about
asking it but I can't find the information in the documentation. How
do you operate on files with Python? Since it is so obvious a
question it should be in the docs somewhere but the tutorial doesn't
seem to mention anything about file handles, etc, even though it goes
on at some length about Classes, Errors, and Exceptions. I think this
is why I picked up and then fairly quickly put down the language a few
months ago. It wasn't obvious how I could do in Python what I did
easily with Perl and Icon. And opening and closing and manipulating
text files was the first thing that I wanted to do, but didn't see how
too. I can wait on multiple inheritance until I actually know how to
get data into my program! Python looks like it will do all the things
I want it to do, but I wish that it had more complete entry level
documentation.

Alan Sandercock