This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Python os.path.join inconsistency?

I don't know anything about Python but I do know that

'c:/foo' and 'c:/foo/bar' are not windows paths.

c:\foo and c:\foo\bar are.

This probably doesn't help though.


Andres Corrada-Emmanuel wrote:


I just ran across an inconsistency on the os.path module for Cygwin
Python, specifically os.path.join:

import os.path
os.path.join( 'c:/foo', 'c:/foo/bar' )


os.path.join( '/cygdrive/c/foo', '/cygdrive/c/foo/bar' )


The first incantation of os.path.join with Windows style paths violates
the documentation statement that os.path.join neglects previous paths once
it encounters an absolute path.

Does it not seem inconsistent that if Cygwin Python understands how to

file( 'c:/foo/bar' ) as well as file( '/cygdrive/c/foo/bar' )

it should also treat Windows style paths correctly with os.path.join? In
other words, it seems that Python on Cygwin cannot default to using for os.path. It's got to be with some additional
magic to get it to do os.path.join correctly.

How does one go about submitting a patch for Cygwin Python?

Andres Corrada-Emmanuel
Senior Research Fellow
Information Extraction and Synthesis Laboratory
University of Massachusetts, Amherst

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]