delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Date: | Mon, 30 Aug 2004 13:29:38 -0400 (EDT) |
From: | Andres Corrada-Emmanuel <corrada AT dandenong DOT cs DOT umass DOT edu> |
To: | <cygwin AT cygwin DOT com> |
Subject: | Python os.path.join inconsistency? |
Message-ID: | <Pine.SOL.4.31.0408301317480.11638-100000@dandenong.cs.umass.edu> |
MIME-Version: | 1.0 |
Hello, 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' ) 'c:foo/c:/foo/bar' >>> os.path.join( '/cygdrive/c/foo', '/cygdrive/c/foo/bar' ) '/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 execute: 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 posixpath.py for os.path. It's got to be posixpath.py 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: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |