python核心编程第二版的源码 #!/usr/bin/env python 'readTextFile.py -- read and display text file' # get filename fname = raw_input('Enter file name: ') print # attempt to open file for reading try: fobj = open(fname, 'r') except IOError, e: print"*** file o pe
This book assumes you’re an experienced programmer, and it’s best if you have learned Python through another book. For everyone else, this chapter gives a fast introduction to the language.