Re: ending a string with a backslash

2006-05-01 Thread John Salerno
Roel Schroeven wrote: > I think this is also the right time to mention os.path.join. Yeah, I ended up using this and it looks a lot nicer too. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: ending a string with a backslash

2006-05-01 Thread Roel Schroeven
John Salerno schreef: > Edward Elliott wrote: >> John Salerno wrote: >>> Obviously the single backslash at the end of 'path' will cause a >>> problem, and escaping it with a backslash seems to fix this problem, but >>> how does escaping work when I already have it as a raw string? >> see the first

Re: ending a string with a backslash

2006-05-01 Thread Dan Bishop
John Salerno wrote: > I have this: > > subdomain = raw_input('Enter subdomain name: ') > > path = r'C:\Documents and Settings\John Salerno\My Documents\My > Webs\1and1\johnjsalerno.com\' + subdomain > > Obviously the single backslash at the end of 'path' will cause a > problem, and escaping it with

Re: ending a string with a backslash

2006-04-30 Thread John Salerno
Edward Elliott wrote: > John Salerno wrote: >> Obviously the single backslash at the end of 'path' will cause a >> problem, and escaping it with a backslash seems to fix this problem, but >> how does escaping work when I already have it as a raw string? > > see the first two items here: > http://

Re: ending a string with a backslash

2006-04-30 Thread Terry Reedy
"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have this: > > subdomain = raw_input('Enter subdomain name: ') > > path = r'C:\Documents and Settings\John Salerno\My Documents\My > Webs\1and1\johnjsalerno.com\' + subdomain For any direct use of paths within Python (

Re: ending a string with a backslash

2006-04-30 Thread Edward Elliott
John Salerno wrote: > Obviously the single backslash at the end of 'path' will cause a > problem, and escaping it with a backslash seems to fix this problem, but > how does escaping work when I already have it as a raw string? see the first two items here: http://www.ferg.org/projects/python_gotc

ending a string with a backslash

2006-04-30 Thread John Salerno
I have this: subdomain = raw_input('Enter subdomain name: ') path = r'C:\Documents and Settings\John Salerno\My Documents\My Webs\1and1\johnjsalerno.com\' + subdomain Obviously the single backslash at the end of 'path' will cause a problem, and escaping it with a backslash seems to fix this pr