×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
1
Language: Python
Posted by: M. Chris
Added: Apr 24, 2019 9:06 AM
Views: 3864
Tags: no tags
  1. #If you want just files, you could either filter this down using os.path:
  2.  
  3. from os import listdir
  4. from os.path import isfile, join
  5. onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]