what's the command for (cd ..) in python

Waldek M. wm at localhost.localdomain
Sat Sep 10 15:57:16 CEST 2011


On Sat, 10 Sep 2011 21:11:32 +1000, Steven D'Aprano wrote:
> The main one that comes to mind is os.walk, which has this to say:
> 
>     Caution:  if you pass a relative pathname for top, don't change the
>     current working directory between resumptions of walk.  walk never
>     changes the current directory, and assumes that the client doesn't
>     either.
> 
> Seems like a reasonable assumption to me.

Oh, that kind of functions.
Yes, that *is* surely reasonable, just as mixing chdir/mkdir/remove
and whatever else that affects the directory structure is not a good idea,
or at least something to be done carefully.
I just wouldn't think to give it some special credit.

Thanks
Waldek



More information about the Python-list mailing list