Skip to content

Instantly share code, notes, and snippets.

@ice2heart
Last active July 27, 2018 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ice2heart/aa47a45307cc850c3ca9f54f97aa5fff to your computer and use it in GitHub Desktop.
Save ice2heart/aa47a45307cc850c3ca9f54f97aa5fff to your computer and use it in GitHub Desktop.
import os
import re
pattern = re.compile(r"[а-яА-Я]+")
list_file = os.listdir('.')
rus_files = []
for directory in os.walk('.'):
for item in directory[2]:
if pattern.search(item):
rus_files.append(directory[0] + "/" + item)
print("чорт, файлик на русском: " + directory[0] + "/" + item)
with open('work.log', 'w+') as f:
for line in rus_files:
f.write(line + '\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment