How to only get a list of the names of the non-directory files in current directory ('.')?

John Gordon gordon at
Wed Nov 7 00:23:07 CET 2012

In <mailman.3345.1352243569.27098.python-list at> iMath <redstone-cold at> writes:

> how to get a list of names of everything in the current directory ?

Try os.listdir() .

John Gordon                   A is for Amy, who fell down the stairs
gordon at              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

More information about the Python-list mailing list