📅  最后修改于: 2022-03-11 14:57:18.010000             🧑  作者: Mango
import pathlib
# define the path
currentDirectory = pathlib.Path('.')
# define the pattern
currentPattern = "*.py"
for currentFile in currentDirectory.glob(currentPattern):
print(currentFile)