Today i was trying to practice python and Im trying to make a script that reads the lines from a file containing only numbers and using said numbers as a parameter in another Python script.
Here at work i sometimes need to execute a python script called Suspend.py, ever time i excute this scripit i must type the following information:
Suspend.py suspend telefoneNumber
If I understand you correctly:
import subprocess with open("file_with_numbers.txt") as f: for line in f: subprocess.call(["python", "Suspend.py", "suspend", line.strip()])