Wijaya Edward <[EMAIL PROTECTED]> writes: > >>> myfile_content = open('somefile.txt') > >>> print myfile_content, > <open file 'somefile.txt', mode 'r' at 0xb7f532e0> > >>> > > But it doesn't print the content of the file.
That's right, because "the content of the file" is not what open() is documented to return; it is documented as returning a 'file' object. The 'read' method of the resulting file object will return the contents of the file. You may also want to read the documentation of thile objects to see what else you can do with them. -- \ "A free society is one where it is safe to be unpopular." -- | `\ Adlai Ewing Stevenson | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list