[Tutor] output question
ml.cyresse at gmail.com
Sat Nov 12 11:54:14 CET 2005
Sorry Shi Mu, don't understand the question.
So, you're successfull opening a file. Now, you need to read it
for line in fsock:
fsockData = fsock.read()
nextLine = fsock.readline()
Have a play with those.
On 11/12/05, Shi Mu <samrobertsmith at gmail.com> wrote:
> I got the output as:
> Yes!!! This line will always print
> from the code:
> fsock = open("c:/TEMP/hello.txt")
> except IOError:
> print "The file does not exist, exiting gracefully"
> print "Yes!!! This line will always print"
> it means the code found there is hello.txt,
> why it does not show on the output.
> Tutor maillist - Tutor at python.org
More information about the Tutor