Здравствуйте господа. Имеется вопрос, как из вызываемого скрипта передать stdout в POST BaseHTTPServer.
def do_POST(self):
self._set_headers()
self.wfile.write("Задание принято на отправку. ")
self.data_string = self.rfile.read(int(self.headers['Content-Length']))
self.send_response(200)
self.end_headers()
email = json.loads(self.data_string)
with open('request.json', 'w') as outfile:
json.dump(email, outfile)
os.system('python relay.py')
return
собственно как выхлоп от os.system('python relay.py') выдать в POST