Skip to content

Instantly share code, notes, and snippets.

@singularitti
Last active April 8, 2019 19:21
Show Gist options
  • Save singularitti/a0681a3db53c8d31c23441c0faae7b50 to your computer and use it in GitHub Desktop.
Save singularitti/a0681a3db53c8d31c23441c0faae7b50 to your computer and use it in GitHub Desktop.
List everything except hidden files/folders under a certain path #Python #iterate #OS
def listdir_nohidden(path):
for f in os.listdir(path):
if not f.startswith('.'):
yield f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment