Re: Sorting Directories from files in a os.listdir??

2008-04-10 Thread Giampaolo Rodola'
On 10 Apr, 11:55, Soren [EMAIL PROTECTED] wrote: Hi, I'd like to read the filenames in a directory, but not the subdirectories, os.listdir() gives me everything... how do I separate the directory names from the filenames? Is there another way of doing this? Thanks! I guess you have no

Re: Sorting Directories from files in a os.listdir??

2008-04-10 Thread David Harrison
On 10/04/2008, Soren [EMAIL PROTECTED] wrote: Hi, I'd like to read the filenames in a directory, but not the subdirectories, os.listdir() gives me everything... how do I separate the directory names from the filenames? Is there another way of doing this? The only thing I can think of if

Sorting Directories from files in a os.listdir??

2008-04-10 Thread Soren
Hi, I'd like to read the filenames in a directory, but not the subdirectories, os.listdir() gives me everything... how do I separate the directory names from the filenames? Is there another way of doing this? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting Directories from files in a os.listdir??

2008-04-10 Thread Soren
On Apr 10, 12:14 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Thu, 10 Apr 2008 06:55:13 -0300, Soren [EMAIL PROTECTED] escribió: I'd like to read the filenames in a directory, but not the subdirectories, os.listdir() gives me everything... how do I separate the directory names from

Re: Sorting Directories from files in a os.listdir??

2008-04-10 Thread Gabriel Genellina
En Thu, 10 Apr 2008 06:55:13 -0300, Soren [EMAIL PROTECTED] escribió: I'd like to read the filenames in a directory, but not the subdirectories, os.listdir() gives me everything... how do I separate the directory names from the filenames? Is there another way of doing this? Check each

Re: Sorting Directories from files in a os.listdir??

2008-04-10 Thread Scott David Daniels
Soren wrote: Hi, I'd like to read the filenames in a directory, but not the subdirectories, os.listdir() gives me everything... how do I separate the directory names from the filenames? Is there another way of doing this? Thanks! import os base, files, dirs =

Re: Sorting Directories from files in a os.listdir??

2008-04-10 Thread Peter Otten
Scott David Daniels wrote: I'd like to read the filenames in a directory, but not the subdirectories, os.listdir() gives me everything... how do I separate the directory names from the filenames? Is there another way of doing this? Thanks! import os base, files, dirs =