Feb-12-2021, 08:05 AM
Python has built-in module fnmatch (Unix filename pattern matching) which can be used to directly implement 'Debug*.log' pattern. This module also have filter, so one can write:
>>> import fnmatch >>> filenames = ['Debug1.log', 'Debug1.txt', 'Debug.log'] >>> fnmatch.filter(filenames, 'Debug*.log') ['Debug1.log', 'Debug.log']
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.