title: Python: how to feed a user-defined value into the middle of a pipeline?
body: <p>In a shell script I perform a task by executing 3 Python programs, connected by pipes:</p>
  
  <pre><code>cat input.txt | crawl | assess | format &gt; out.txt
  </code></pre>
  
  <p>The <code>assess</code> program has a variable <code>max_text_length</code> that is assigned a default value:</p>
  
  <pre><code>max_text_length = 20
  </code></pre>
  
  <p>I want users to be able to change that value when they run my shell script. </p>
  
  <p>How do I enable users to feed into <code>assess</code> a new value for <code>max_text_length</code>? </p>
  
  <p>Note: each of my 3 Python programs (<code>crawl</code>, <code>assess</code>, <code>format</code>) read from <code>stdin</code> and write to <code>stdout</code>. They do not read from the command line.</p>