noob: print and file.read()
why the following code doesn't print the content of the file:
in_file = open(from_file)
str = in_file.read()
print "Here should be the output from the file - ", in_file.read()
print "Here should be the output from the STR- ", str in_file.close()
The first "print" has nothing whereas the second properly displays the
content of the file.
|All times are GMT. The time now is 05:25 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.