How can I use command line tools like ls, grep from python.
Asked
Active
Viewed 60 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
- 3,602
- 6
- 34
- 66
0
I think if you import os and do os.system(command) that can execute commands.
import os
os.system("your command here")
jjvandermade
- 351
- 4
- 11