This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients Ronny.Pfannschmidt, eric.araujo, ezio.melotti, pitrou
Date 2012-03-01.05:58:16
SpamBayes Score 0.0007128867
Marked as misclassified No
Message-id <1330581497.89.0.825178058534.issue14161@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-03-01 05:58:17eric.araujosetrecipients: + eric.araujo, pitrou, ezio.melotti, Ronny.Pfannschmidt
2012-03-01 05:58:17eric.araujosetmessageid: <1330581497.89.0.825178058534.issue14161@psf.upfronthosting.co.za>
2012-03-01 05:58:17eric.araujolinkissue14161 messages
2012-03-01 05:58:16eric.araujocreate