On Sep 22, 2005, at 8:58 PM, Trent Mick wrote:
> [richard barran wrote]
>
>> So I have a question: do the previous mails mean that a relpath
>> function might possibly be a usefull addition to os.path?
>>
>
> Yes, it seems to have support.
I'd like to throw in another late +1 here, I've written
[richard barran wrote]
> So I have a question: do the previous mails mean that a relpath
> function might possibly be a usefull addition to os.path?
Yes, it seems to have support.
> And if the answer to the previous question is "yes", then should I
> submit a patch, or is someone else already
On Sat, 17 Sep 2005, John J Lee wrote:
>
> On Fri, 16 Sep 2005, Greg Ewing wrote:
>
> > Trent Mick wrote:
> >
> > > If this *does* get added (I'm +0) then let's call it "relpath" or
> > > "relpathto" as in the various implementations out there:
> >
> > +1 on that, too. Preferably just "re
On 9/20/05, Greg Ewing <[EMAIL PROTECTED]> wrote:
> Matthias Andreas Benkard wrote:
>
> * In a recent project, I had occasion to store pathnames of
>picture files in a relational database. I wanted to store
>the pathnames relative to a user-chosen "Pictures"
>directory, so that it could
On Wed, 21 Sep 2005 02:55:56 +0200, Greg Ewing
<[EMAIL PROTECTED]> wrote:
> Both of these happen to involve pathnames that exist on
> the currrently available file system, but I can easily
> imagine cases where that would not be so. E.g. I might
> be generating pathames to go into a tar file that
> > But this begs the question: What is relpath good for, anyway?
>
> A couple of use cases I've encountered:
>
Another one:
- Build tools that work with paths alot can really improve their log
readability if relative paths can be used to keep paths short rather
than the common fallback of
Matthias Andreas Benkard wrote:
> But this begs the question: What is relpath good for, anyway?
[Assuming you mean "invites", "prompts", etc. the question...:-)]
A couple of use cases I've encountered:
* Creating symbolic links. I'm traversing a directory
hierarchy, and building a parallel h
Hi,
> IMO, the relpath method should just work textually on
> the pathnames. It's up to the user to ensure it makes
> sense to do so, e.g. by resolving symlinks beforehand
> if necessary.
I guess so. Don't forget to mention this quirk in the docs, though :)
> The alternative would be for relpath
Delaney, Timothy (Tim) wrote:
>
> In addition, I would presume that relpath would just return the absolute
> path if passed an absolute path as the second parameter.
I don't think so. Wouldn't you expect the
result of
relpath("/usr/local/foo/bax/grump.c", "/usr/local/flump/grump.c")
to be ".
Greg Ewing wrote:
> Matthias Andreas Benkard wrote:
>
>> /home -> usr/home
>> /usr
>> /usr/home
>>
>> What does os.path.diff("/home/", "/usr/") yield? "../usr/", I would
>> presume? But that's obviously wrong:
>
> IMO, the relpath method should just work textually on
> the pathnames. It's up to
Matthias Andreas Benkard wrote:
> /home -> usr/home
> /usr
> /usr/home
>
> What does os.path.diff("/home/", "/usr/") yield? "../usr/", I would
> presume? But that's obviously wrong:
IMO, the relpath method should just work textually on
the pathnames. It's up to the user to ensure it makes
sense
Hi,
> /home -> usr/home
Sorry, I forgot to mention what I meant by this: /home is a symlink
pointing to usr/home (that is, /usr/home).
Bye,
Matthias
Matthias Andreas Benkard, Anarchokommunist und Pythonprogrammierer
Per
Hi,
> This function would take two paths: A and B and give
> the relation between them. Here are a few of examples.
>
> os.path.diff("/A/C/D/", "/A/D/F/")
> ==> "../../D/F"
>
> os.path.diff("/A/", "/A/B/C/")
> ==> "B/C"
>
> os.path.diff("/A/B/C/", "/A/")
> ==> "../.."
I'm not sure whether s
On Fri, 16 Sep 2005, Greg Ewing wrote:
> Trent Mick wrote:
>
> > If this *does* get added (I'm +0) then let's call it "relpath" or
> > "relpathto" as in the various implementations out there:
>
> +1 on that, too. Preferably just "relpath".
[...]
+1 on adding this function, and on "relpath" as t
Trent Mick wrote:
> If this *does* get added (I'm +0) then let's call it "relpath" or
> "relpathto" as in the various implementations out there:
+1 on that, too. Preferably just "relpath".
--
Greg Ewing, Computer Science Dept, +--+
University of Canterbury,
[Greg Ewing wrote]
> Nathan Bullock wrote:
> > I find that I quite often want a
> > function that will give me a relative path from path A
> > to path B. I have created such a function, but it
> > would be nice if it was in the standard library.
>
> +1 from me. It's a fairly common thing to want t
Nathan Bullock wrote:
> I find that I quite often want a
> function that will give me a relative path from path A
> to path B. I have created such a function, but it
> would be nice if it was in the standard library.
+1 from me. It's a fairly common thing to want to do.
Greg
_
On 9/12/05, Nathan Bullock <[EMAIL PROTECTED]> wrote:
> Just wondering if a function such as this has ever
> been considered? I find that I quite often want a
> function that will give me a relative path from path A
> to path B. I have created such a function, but it
> would be nice if it was in th
[Nathan Bullock wrote]
> Just wondering if a function such as this has ever
> been considered? I find that I quite often want a
> function that will give me a relative path from path A
> to path B. I have created such a function, but it
> would be nice if it was in the standard library.
>
> This f
Just wondering if a function such as this has ever
been considered? I find that I quite often want a
function that will give me a relative path from path A
to path B. I have created such a function, but it
would be nice if it was in the standard library.
This function would take two paths: A and B
20 matches
Mail list logo