X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=CyYP 31xl7S19Y61MqBcJGyGnKWtlWETSW3jOycNM5Ut7G5u2yRvMvdkWdpud6o6IBb5J b13iIcOGq1tH38/qqS9c6hbn5DO2PXR/pXwxXhut2Eu77vGTTIZ9VvThjeY5RRRT Fgm6N9zF8qgQmIEsWBy6SLlgOM7JB8cQamfv7Jw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=Sf8oUgKebm Hbj1ekov7PTaY9AlQ=; b=GapQgdMxRFKD7FoEFj/X01gAGJSAz+6Xoqga5wJ36X gOeK6tJUMxioAqwPf0hUeKh6xJWrfBfyaMAswNjGbAgyIGwZMb34c+PFT8BJ1hqj TVQpl3ugFUOW90RrJBqwboaWYhvpB9FyRiTn68BDf188XsBKQkH9hG0CZoDkKM/W o= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=BAYES_50,KHOP_THREADED,RDNS_NONE,SPF_PASS autolearn=no version=3.3.1 Date: Tue, 16 Jul 2013 18:19:01 +0300 From: Mikko Rapeli To: cygwin AT cygwin DOT com Subject: Re: Cygwin, python and abspath() Message-ID: <20130716151901.GJ23038@lakka.kapsi.fi> References: <20130716150106 DOT GI23038 AT lakka DOT kapsi DOT fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130716150106.GI23038@lakka.kapsi.fi> X-SA-Exim-Connect-IP: 2001:1bc8:1004::1 X-SA-Exim-Mail-From: mikko DOT rapeli AT iki DOT fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false On Tue, Jul 16, 2013 at 06:01:06PM +0300, Mikko Rapeli wrote: > Hi, > > Does anyone know why os.path.abspath() in python on cygwin is creating > invalid path names when given these cygwin compatible dos path names? > > $ pwd > /cygdrive/c/temp > > $ python -c "import os; os.path.abspath('/cygdrive/c/temp')" > /cygdrive/c/temp > > $ python -c "import os; os.path.abspath('c:/temp')" > /cygdrive/c/temp/c:/temp > > I have cmake generating the dos compatible path names and they work with > all other cygwin utilities that I've used. Perl seems to understand both ways as absolute paths: $ perl -e 'use File::Spec; print File::Spec->rel2abs("c:/temp")' c:/temp $ perl -e 'use File::Spec; print File::Spec->rel2abs("/cygdrive/c/temp")' /cygdrive/bin/perl $ which perl /usr/bin/perl $ perl --version | head -2 | tail -1 This is perl 5, version 14, subversion 2 (v5.14.2) built for cygwin-thread-multi-64int -Mikko -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple