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