Python

subprocess

Në shqip përdoret i njëjti emër.

ShpjegimiSQ

subprocess.run() ekzekuton një komandë terminali nga Python-i dhe ta jep rezultatin — p.sh. git status ose ffmpeg. Kujdes: mos fut kurrë tekst nga përdoruesi direkt në komandë.

EnglishEN

subprocess.run() runs a terminal command from Python and gives you the result — e.g. git status or ffmpeg. Careful: never put user text straight into the command.

Si ta mendosh

Si t'i kërkosh një kolegu të bëjë një punë dhe të të tregojë rezultatin.

Lexoje në anglisht

Like asking a colleague to do a job and report back.

Shembull kodipython

import subprocess
r = subprocess.run(["git", "status", "--short"], capture_output=True, text=True)
print(r.stdout)

Terma të lidhur