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

John Gordon gordon at panix.com
Tue Nov 6 18:23:07 EST 2012


In <mailman.3345.1352243569.27098.python-list at python.org> iMath <redstone-cold at 163.com> 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 panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list