Directory Traversal

Alexander, Jason jalexander at aivia.net
Wed Mar 1 17:49:37 EST 2000


Great!

That's exactly what I was needing... thank you very much!


-Jason

-----Original Message-----
From: Hans Nowak [mailto:hnowak at cuci.nl]
Sent: Wednesday, March 01, 2000 4:44 PM
To: Alexander, Jason; python-list at python.org
Subject: Re: Directory Traversal




On 1 Mar 00, at 16:42, Alexander, Jason wrote:

> Hey all,
> 
> 
> On my current project I'm attempting to traverse down a given directory,
> and I'm coming across the dilemma of having a difficult time being able to
> discern a file from a directory when using the os.listdir() call... can
> anyone give any insight to this?

You can use os.path.isfile to check if a name is a file or a directory.

HTH,

--Hans Nowak (zephyrfalcon at hvision.nl)
Homepage: http://fly.to/zephyrfalcon
You call me a masterless man. You are wrong. I am my own master.

-- 
http://www.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list