Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,4 @@
from pathlib import Path
for path in Path('.').rglob('*.*'):
print(path)

View file

@ -0,0 +1,9 @@
import fnmatch
import os
rootPath = '/'
pattern = '*.mp3'
for root, dirs, files in os.walk(rootPath):
for filename in fnmatch.filter(files, pattern):
print( os.path.join(root, filename))

View file

@ -0,0 +1,9 @@
from fnmatch import fnmatch
import os, os.path
def print_fnmatches(pattern, dir, files):
for filename in files:
if fnmatch(filename, pattern):
print os.path.join(dir, filename)
os.path.walk('/', print_fnmatches, '*.mp3')

View file

@ -0,0 +1,8 @@
from path import path
rootPath = '/'
pattern = '*.mp3'
d = path(rootPath)
for f in d.walkfiles(pattern):
print f