<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> myfile_content is an object and you have only opened the file. Python
> doesn't yet know whether you want to read it, copy it etc.
>
> to read it try
>
> text = myfile_content.readlines()
> print text
>
> this should be in most tutoria
myfile_content is an object and you have only opened the file. Python
doesn't yet know whether you want to read it, copy it etc.
to read it try
text = myfile_content.readlines()
print text
this should be in most tutorials
Wijaya Edward wrote:
> Hi,
>
> How can we slurp content of a single fil
From: [EMAIL PROTECTED] on behalf of Wijaya Edward
Sent: Thu 10/26/2006 11:47 PM
To: python-list@python.org
Subject: Slurping All Content of a File into a Variable
Hi,
How can we slurp content of a single file
into one variable?
I tried this:
>>> myfile_