mirror of
https://github.com/Rushilwiz/SkoolOS.git
synced 2025-04-16 02:10:19 -04:00
17 lines
362 B
Python
17 lines
362 B
Python
import subprocess
|
|
import os
|
|
import time
|
|
|
|
def command(command):
|
|
ar = []
|
|
command = command.split(" ")
|
|
for c in command:
|
|
ar.append(c)
|
|
process = subprocess.Popen(ar, stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
|
p=process.poll()
|
|
output = process.communicate()[0]
|
|
print(output)
|
|
|
|
command('echo hello')
|
|
command('python runtest.py')
|