How can I use command line tools like ls, grep from python.
Asked
Active
Viewed 70 times
-3
-
oh you know what, I may have misunderstood this question, and answered the command line arguments part. – pandorym Mar 16 '16 at 02:33
3 Answers
0
This is done with subprocess
import subprocess
subprocess.call("ls", shell=True)

Qwertie
- 5,784
- 12
- 45
- 89
0
I think if you import os and do os.system(command) that can execute commands.
import os
os.system("your command here")

jjvandermade
- 399
- 1
- 5
- 13