Automation scripts with Python
Në shqip: Automatizimi me Python
ShpjegimiSQ
Një nga përdorimet më të dobishme të Python-it: skripte që bëjnë punët e mërzitshme — riemërtojnë qindra skedarë, plotësojnë Excel, dërgojnë email, shkarkojnë të dhëna. Libri „Automate the Boring Stuff“ është falas online.
EnglishEN
One of Python's most useful jobs: scripts that do boring work — renaming hundreds of files, filling in Excel, sending emails, downloading data. The book “Automate the Boring Stuff” is free online.
Si ta mendosh
Si një robot që ta bën punën e shtëpisë ndërsa ti mëson.
Lexoje në anglisht
Like a robot doing your chores while you study.
Shembull kodipython
from pathlib import Path
for i, f in enumerate(sorted(Path("foto").glob("*.jpg")), 1):
f.rename(f.with_name(f"pushime_{i:03}.jpg"))