[issue4023] convert os.getcwdu() to os.getcwd(), and getcwdu() to getcwd()
STINNER Victor
report at bugs.python.org
Fri Oct 3 01:22:19 CEST 2008
New submission from STINNER Victor <victor.stinner at haypocalc.com>:
Python3 removes os.getcwdu() and introduces os.getcwdb(). The patch is
a fixer for lib2to3 replacing "os.getcwdu()" to "os.getcwd()",
and "getcwdu()" to "getcwd()". I hope that nobody defined its
own "getcwdu()" function :-)
Example:
----
cwd = os.getcwdu()
print "cwd=%s" % cwd
from os import getcwdu
cwd = getcwdu()
print "cwd=%s" % cwd
----
Result:
-----
import os
-cwd = os.getcwdu()
-print "cwd=%s" % cwd
+cwd = os.getcwd()
+print("cwd=%s" % cwd)
-from os import getcwdu
-cwd = getcwdu()
-print "cwd=%s" % cwd
+from os import getcwd
+cwd = getcwd()
+print("cwd=%s" % cwd)
-----
----------
assignee: benjamin.peterson
components: 2to3 (2.x to 3.0 conversion tool)
keywords: patch
messages: 74211
nosy: benjamin.peterson, haypo
severity: normal
status: open
title: convert os.getcwdu() to os.getcwd(), and getcwdu() to getcwd()
versions: Python 3.0
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4023>
_______________________________________
More information about the Python-bugs-list
mailing list