0

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?

Rajesh s
  • 153
  • 1
  • 8
  • 3
    Possible 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 Answers1

0

import os command = r'.../...externalProgram' os.system(command)

or

import subprocess command = r'.../...externalProgram' subprocess.run(command)

ulile
  • 16
  • 2