title: Send commands from command line to a running Python script in Unix
body: <p>I want to build a script that can be controlled while running from another scripts. For example I want to run my script like this:</p>
  
  <pre><code>~: Server &amp;
  </code></pre>
  
  <p>and be able to run one of it's functions like:</p>
  
  <pre><code>~: client func1
  </code></pre>
  
  <p>Upon my searches I find signal module that have something like I want, but it's signals are predefined and I can not send signals of my own. </p>
  
  <p>I even though of a client/server implementation using a network framework but I think it's too much for the abilities that I want my script to have. </p>
  
  <p>Thank you all.</p>