Run Linux Command Using python script.

import subprocess
       
command = "ps aux | grep python"
p = subprocess.run(command, shell=True, capture_output=True)
output = p.stdout.decode('utf-8')
print(output)

Comments

Popular posts from this blog

How To Install & setup Python 3.8 Version on Windows 10

How to Connect Django With PostgreSql / Mysql / Oracel Database

How to Connect Firebase Using Pyrebase In Python