Pascale Mourier <pascale.mour...@ecp.fr> wrote: > >YES IT IS! Sorry for the inconvenience. I usually start from this >assumption. Yesterday this new student was really agressive, and I >assumed he was right! > >Here's his mistake: with Windows the name of the directory rooted at a >drive name (say C:) is called 'C:\' not 'C:', and it's been that way for >ages.
The root of drive C: is, indeed, spelled "C:\". However, the spelling "C:" has a well-defined meaning, and it has since MS-DOS 2 when directories were introduced. It means "the current directory for C:". >Well, os.listdir('C:') instead of raising an exception, for some reason >behaves like os.listdir('.'). Because it's not an exception. The meaning is well-defined. This can be very handy, for example, when copying between deeply nested paths on different drives: D: cd "\Ridiculous\Long\Path\Names\For Annoyance" C: cd "\Another\Ridiculous\Long\Path\Name" copy C:one.txt D:two.txt -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list