Telegram Group & Telegram Channel
Находим файлы по шаблону

Основной фишкой модуля glob является удобная и лаконичная работа с поиском файлов по паттернам. Более того, можно даже пройтись по директориям рекурсивно.

В одноименный метод glob передаётся шаблон для поиска файлов, а возвращается список с результатами. Все методы следуют механизму и правилам сопоставления паттернов в стиле Unix.

Вообще модуль является встроенным, но в некоторых ситуациях импорт может выдать исключение. В таком случае надо просто его переустановить через пакетный менеджер pip.

#glob



tg-me.com/python_academy/1971
Create:
Last Update:

Находим файлы по шаблону

Основной фишкой модуля glob является удобная и лаконичная работа с поиском файлов по паттернам. Более того, можно даже пройтись по директориям рекурсивно.

В одноименный метод glob передаётся шаблон для поиска файлов, а возвращается список с результатами. Все методы следуют механизму и правилам сопоставления паттернов в стиле Unix.

Вообще модуль является встроенным, но в некоторых ситуациях импорт может выдать исключение. В таком случае надо просто его переустановить через пакетный менеджер pip.

#glob

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/1971

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

Telegram and Signal Havens for Right-Wing Extremists

Since the violent storming of Capitol Hill and subsequent ban of former U.S. President Donald Trump from Facebook and Twitter, the removal of Parler from Amazon’s servers, and the de-platforming of incendiary right-wing content, messaging services Telegram and Signal have seen a deluge of new users. In January alone, Telegram reported 90 million new accounts. Its founder, Pavel Durov, described this as “the largest digital migration in human history.” Signal reportedly doubled its user base to 40 million people and became the most downloaded app in 70 countries. The two services rely on encryption to protect the privacy of user communication, which has made them popular with protesters seeking to conceal their identities against repressive governments in places like Belarus, Hong Kong, and Iran. But the same encryption technology has also made them a favored communication tool for criminals and terrorist groups, including al Qaeda and the Islamic State.

The Singapore stock market has alternated between positive and negative finishes through the last five trading days since the end of the two-day winning streak in which it had added more than a dozen points or 0.4 percent. The Straits Times Index now sits just above the 3,060-point plateau and it's likely to see a narrow trading range on Monday.

Python Academy from ru


Telegram Python Academy
FROM USA