Steve Holden a écrit : > Bruno Desthuilliers wrote: (snip) >> You can avoid all escaping by using raw strings: >> >> mypath = r"C:\enhancement\rawfiles\" >> > Please note that the above is a well-known syntax error. A string > literal cannot end with a single backslash, as it escapes the closing > quote.
oops ! My bad :( Thanks for the correction... (snip) >> Also and IIRC, using slash instead should also work, ie: >> >> mypath = r"C:/enhancement/rawfiles/" >> > That does indeed work in most situations, but ideally (i.e. for maximum > code portability) paths should be constructed using os.path.join(), or > collected from the environment somehow. Indeed. But I doubt a path starting with 'C:' will work fine on a unix-like environment anyway !-) -- http://mail.python.org/mailman/listinfo/python-list