Message154675
Duh, obviously that code branch is used only for unicode paths:
>>> open('/tmp/t\nest', 'w')
<open file '/tmp/t
est', mode 'w' at 0x7f6f0f3dd9c0>
>>> open(u'/tmp/t\nest', 'w')
<open file u'/tmp/t\nest', mode 'w' at 0x7f6f0f3dda50>
There does not seem to be something similar in http://docs.python.org/c-api/string, so I guess one would have to create intermediary objects to decode str to unicode, transform with unicode-escape and convert back to str. |
|
Date |
User |
Action |
Args |
2012-03-01 05:58:17 | eric.araujo | set | recipients:
+ eric.araujo, pitrou, ezio.melotti, Ronny.Pfannschmidt |
2012-03-01 05:58:17 | eric.araujo | set | messageid: <1330581497.89.0.825178058534.issue14161@psf.upfronthosting.co.za> |
2012-03-01 05:58:17 | eric.araujo | link | issue14161 messages |
2012-03-01 05:58:16 | eric.araujo | create | |
|