title: How to redirect Python print commands to putty SSH console?
body: <p>after many unsuccessful researches I've decided to ask my question here so maybe someone will provide me an answer or a lead for a problem I got.</p>
  
  <p>I have a Python script that runs as a background process on an embedded device (the OS is a Linux distro). This script do important measurements and because of that, it can not be terminated or restarted.</p>
  
  <p>I was wondering if it was possible to implement a chunk of code that will redirect the print() outputs to a Putty SSH console when we send it a command via a messaging protocol (MQTT).</p>
  
  <p>So the situation will be like this:</p>
  
  <ul>
  <li>Device receive a command, set a variable to 1</li>
  <li>Print() outputs will now be visible on the current root session opened by Putty SSH client.</li>
  </ul>
  
  <p>I don't know if it is possible but I'm opened to suggestions.</p>
  
  <p>Thank you in advance for your answers, and sorry for my bad english.</p>