Message216694
In addition, you probably want "\\server\path\to" to be a raw string, too. That way, the backslashes are not given special meaning. Notice the difference in output between these two:
>>> "\\server\path\to".strip(r'"\'<>')
'server\\path\to'
>>> r"\\server\path\to".strip(r'"\'<>')
'server\\path\\to'
In the first one, '\t' is being treated as a tab character, in the second one you see a backslash followed by a 't'.
My rule of thumb is: any time you have a string with a filename containing backslashes, you want it to be a raw string. |
|
Date |
User |
Action |
Args |
2014-04-17 14:50:33 | eric.smith | set | recipients:
+ eric.smith, ezio.melotti, mrabarnett, Tito.Bouzout |
2014-04-17 14:50:33 | eric.smith | set | messageid: <1397746233.46.0.987484386143.issue21283@psf.upfronthosting.co.za> |
2014-04-17 14:50:33 | eric.smith | link | issue21283 messages |
2014-04-17 14:50:33 | eric.smith | create | |
|