import os os.listdir("c:\") dirname = "c:\" os.listdir(dirname) print [f for f in os.listdir(dirname) if os.path.isfile(os.path.join(dirname, f))] [3] print [f for f in os.listdir(dirname) if os.path.isdir(os.path.join(dirname, f))] [4]
Name (required)
email (will not be published) (required)
Website