NEWBIE TIP: Reading a file two different ways...from ENGSOL

Peter Mayne Peter.Mayne at au1.ibm.com
Mon Aug 6 08:55:56 EDT 2001


<engsol at teleport.com> wrote in message
news:3b6b720d.12189167 at news.onemain.com...
>
> FileRead("c:\\python21\\tags\\cauxd.tex")  # Notice the double \\'s
>
> readfile("c:\\python21\\tags\\cauxd.tex")

Windows is perfectly happy to accept "/" as a legal path separator, so

FileRead("c:/python21/tags/cauxd.tex")

readfile("c:/python21/tags/cauxd.tex")

is more readable, and saves a comment 8-).

PJDM
--
Peter Mayne
IBM GSA (but the opinions are mine)
Canberra, ACT, Australia
This post is covered by Sturgeon's Law.





More information about the Python-list mailing list