You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pyfiles = [name for name in os.listdir('somedir')
if name.endswith('.py')]
import glob
pyfiles = glob.glob('somedir/*.py')
from fnmatch import fnmatch
pyfiles = [name for name in os.listdir('somedir')
if fnmatch(name, '*.py')]
The text was updated successfully, but these errors were encountered:
如在某个路径下列出
.py
文件,可通过如下方法:如下:
The text was updated successfully, but these errors were encountered: