(no subject)

Roger Upole rupole at compaq.net
Mon May 22 22:14:29 EDT 2000


The first line should have yielded an IOError (file not found).
The backslashes have to be doubled or they will be interpreted
as escapes.  The \t in \temp would become a tab.
However, if the filename is right and there is actually anything in
the file, the second line should retrieve it.
      Roger Upole

"Phoon, David" <DPhoon at acnielsen.com.au> wrote in message
news:509FE401C620D311A3890001FA68BA95017671A7 at ACNSYDMSX10.acnielsen.com.au..
.
> hi
>
>
> I am trying out the tutorial to file reading and writing and when I run
> python in nt
> eg >>> f=open('c:\temp\myfile.txt','r')
> >>> f.read()
> yields a blank string...""
>
> how do i parse the arguments in open??
>
>
> thanks
> ######################################################################
> CAUTION: This Message may contain confidential information intended
> only for the use of the addressee named above. If you are not the
> intended recipient of this message you are hereby notified that any
> use, dissemination, distribution or reproduction of this message is
> prohibited. If you received this message in error please notify your
> Mail Administrators immediately. Any views expressed in this
> message are those of the individual sender and may not necessarily
> reflect the views of ACNielsen.
> ######################################################################
>





More information about the Python-list mailing list