On Mon, May 3, 2010 at 6:49 AM, Baz Walter <baz...@ftml.net> wrote: > On 03/05/10 14:18, Chris Rebert wrote: >> Whether or not /home/baz/tmp/xxx/ exists, we know from the very >> structure and properties of directory paths that its parent directory >> is, *by definition*, /home/baz/tmp/ (just chop off everything after >> the second-to-last slash). I would assume this is what happens >> internally. >> How exactly this interacts with, say, moving the directory to a new >> location rather than deleting it, I don't know; again, it would quite >> likely be platform-specific. > > but how does '..' get resolved in the relative path '../abc.txt'? i'm > assuming python must initially use getcwd() internally to do this, and then > if that fails it falls back on something else. but what is that something > else? is it something that is reproducible in pure python?
I would think that the OS system call, not Python itself, does the relative->absolute conversion. Cheers, Chris -- Fsck MMW. -- http://mail.python.org/mailman/listinfo/python-list