User Tools

Site Tools


misc:code_snippets:python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
misc:code_snippets:python [2017/04/11 15:13] – Dateien aus Verzeichnis oder von Datei lesen saschamisc:code_snippets:python [2017/04/11 15:13] (current) – Fix sascha
Line 98: Line 98:
  
     if isdir(path):     if isdir(path):
-        files = [pjoin(abspath(source), f) for f in os.listdir(source) if +        files = [pjoin(abspath(path), f) for f in os.listdir(path) if 
-                 (isfile(pjoin(source, f)) and f.lower().endswith('.ext'))]+                 (isfile(pjoin(path, f)) and f.lower().endswith('.ext'))]
     elif isfile(path):     elif isfile(path):
         with open(path, 'r') as lst:         with open(path, 'r') as lst:
misc/code_snippets/python.1491923580.txt.gz · Last modified: by sascha