[pypy-commit] [COMMENT] Pull request #43 for pypy/pypy: Sprint: Fixes for py3k modules

Bitbucket notifications-noreply at bitbucket.org
Tue Mar 13 21:53:29 CET 2012


New comment on pull request:

https://bitbucket.org/pypy/pypy/pull-request/43/sprint-fixes-for-py3k-modules#comment-3871

Preston Timmons (prestontimmons) said:

Thanks! To clarify:

If I understand it, the below function tries to call decode on the py3k string returned by getcwd, which won't work. 

I should have posix systems use the codecs module to decode the string to the filesystem encoding.

{{{
#!python

def getcwdu(space):
    """Return the current working directory as a unicode string."""
    filesystemencoding = space.sys.filesystemencoding
    return space.call_method(getcwd(space), 'decode',
                             space.wrap(filesystemencoding))
}}}

--
This is a pull request comment notification from bitbucket.org.
You are receiving this either because you are participating
in a pull request, or you are following it.


More information about the pypy-commit mailing list