How to call an external program in Linux and also pass some arguments to it? For example I want to open 'nedit' in Linux and pass some text there.. Is it possible?
Asked
Active
Viewed 26 times
0
-
3Possible duplicate of [Calling an external command in Python](https://stackoverflow.com/questions/89228/calling-an-external-command-in-python) – Bijoy Jun 20 '18 at 03:48
1 Answers
0
import os command = r'.../...externalProgram' os.system(command)
or
import subprocess command = r'.../...externalProgram' subprocess.run(command)

ulile
- 16
- 2