/
ilya.petrash
/
SimplePyScripts
Обзор
Документация
Войти
/
ilya.petrash
/
SimplePyScripts
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
glob__examples/recursive_search.py
37 строк
683 B
gil9red
Refactoring. Using black code style
18 май 2023, 17:39
18 май 2023, 17:39
4f8c571
Код
Авторство
О чём код?
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "ipetrash" # SOURCE: https://docs.python.org/3.6/library/glob.html#module-glob import glob import os items = glob.glob("../*") print(items) print(list(map(os.path.abspath, items))) print() items = glob.glob("../*.md") print(items) print(list(map(os.path.abspath, items))) print() items = glob.glob("../**/*.md", recursive=True) print(items) print(list(map(os.path.abspath, items))) print() items = glob.glob("../**/*.txt", recursive=True) print(items) print(list(map(os.path.abspath, items))) print() items = glob.glob("../**/*.png", recursive=True) print(items) print(list(map(os.path.abspath, items))) print()