Find lowest level directory
Mark Lawrence
breamoreboy at yahoo.co.uk
Thu Dec 13 08:09:40 EST 2012
On 13/12/2012 12:48, loial wrote:
> How can I find the full path of the lowest level directory in a directory structure?
>
> If there is more than one directory at the lowest level, the first one found will be enough.
>
> Any help appreciated
>
Take a look at the os.path functions. Note that os.path.walk in Python
2 is called os.walk in Python 3.
--
Cheers.
Mark Lawrence.
More information about the Python-list
mailing list