command.py 265 B

123456789101112
  1. import subprocess
  2. from core.Models.Neurone import Neurone
  3. class Command(Neurone):
  4. def __init__(self, command):
  5. Neurone.__init__(self)
  6. p = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True)
  7. (output, err) = p.communicate()