Let's see if I can get this right.as I am working on memory and not enough
sleep.
The 'r' means that using a raw string so the backslashes aren't escaped
out
The equivalent without using the 'r' would be: os.chdir('c:\\temp')
--Todd
On Monday 08 August 2005 03:07 am, Don Parris wrote:
Hi Don!
Don Parris wrote:
> The book, "Programming Python", shows an example of os.chdir() on the
> Windows platform, as follows:
>
> os.chdir(r'c:\temp')
r ... raw Strings. There will no substitution be processed.
Otherwise the "\t" ( Tab ) will be inserted in the string:
>>> print "a\tb"
a
The book, "Programming Python", shows an example of os.chdir() on the
Windows platform, as follows:
os.chdir(r'c:\temp')
What's the 'r' for? It didn't seem to make any difference in how
Python works - at least not on the surface.
Thanks,
Don
--
DC Parris GNU Evangelist
http://matheteuo.org/
[E