#!/Library/Frameworks/Python.framework/Versions/3.9/bin/python3
import os
def files(path):
for file in os.listdir(path):
if os.path.isfile(os.path.join(path, file)):
yield file
for file in files("."):
print(file)
file.py
main.py
sorter.py
._sorter.py
#!/Library/Frameworks/Python.framework/Versions/3.9/bin/python3
import os
def files(path):
for file in os.listdir(path):
if os.path.isfile(os.path.join(path, file)):
yield file
for file in files("."):
if '._' in file:
pass
else:
print(file)