[New-bugs-announce] [issue4723] os.path.basename error on directory names with numbers

Klemens Häckel report at bugs.python.org
Mon Dec 22 17:37:34 CET 2008

New submission from Klemens Häckel <click3d at linuxmail.org>:

I am using python for some backup tasks, and recently i found a problem
whe i have certain directory names.
Probably the problem is only in windows, however i would like You to know.
I verified the same behaviour in (WindowsXP, spanish, SP3) using Python
2.5.2 and also in 2.6.1 (installers from Python.org).

In my case i have directory names, beginning with year/month numbers.
Aparrently python is confusing something, so os.path.basename is not

dd = 'C:\downloads\hacking\0812logcompress'
>>> os.path.basename(dd)
>>> dd = 'C:\downloads\hacking\logcompress'
>>> os.path.basename(dd)

components: Windows
messages: 78197
nosy: kle_py
severity: normal
status: open
title: os.path.basename error on directory names with numbers
type: behavior
versions: Python 2.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list