[Python-Dev] Adding the 'path' module (was Re: Some RFE for review)
Andrew Durdin
adurdin at gmail.com
Tue Jun 28 02:42:20 CEST 2005
On 6/28/05, Phillip J. Eby <pje at telecommunity.com> wrote:
>
> AFAICT, the only unresolved issue outstanding is a compromise or
> Pronouncement regarding the atime/ctime/mtime members' datatype. This is
> assuming, of course, that making the "empty path" be os.curdir doesn't
> receive any objections, and that nobody strongly prefers 'path.fromcwd()'
> over 'path.cwd()' as the alternate constructor name.
>
> Apart from these fairly minor issues, there is a very short to-do list,
> small enough to do an implementation patch in an evening or
> two. Documentation might take a similar amount of time after that; mostly
> it'll be copy-paste from the existing os.path docs, though.
While we'ew discussing outstanding issues: In a related discussion of
the path module on c.l.py, Thomas Heller pointed out that the path
module doesn't correctly handle unicode paths:
| I have never used the path module before, although I've heard good
| things about it. But, it seems to have problems with unicode pathnames,
| at least on windows:
|
| C:\>mkdir späm
|
| C:\späm>py24
| Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32
| Type "help", "copyright", "credits" or "license" for more information.
| >>> from path import path
| >>> path.getcwd()
|
| Traceback (most recent call last):
| File "<stdin>", line 1, in ?
| File "C:\TSS5\components\_Pythonlib\path.py", line 97, in getcwd
| return path(os.getcwd())
| UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position
5: ordinal not in range(128)
He suggests a possible fix in his message:
http://mail.python.org/pipermail/python-list/2005-June/287372.html
http://groups-beta.google.com/group/comp.lang.python/msg/b3795a2a0c52b93f
More information about the Python-Dev
mailing list