title: How to pass variables from a py2exe'd python program to a function in another python script
body: <p>I have two modules:  <code>reader.py</code>  and <code>processor.py</code>. The <code>reader.py</code> reads an XML configuration file, validates it, and stores its values in an object. It then calls the <code>processor.py</code> and passes the object to it.</p>
  
  <p>The project requirements state that <code>reader</code> must be compiled to executable. I do this using py2exe. Now that <code>reader</code> is an executable, how can it pass values to <code>processor</code>? When they were both scripts it would be as simple as</p>
  
  <pre><code>from processor import myFunc
  myFunc(myArgs)
  </code></pre>
  
  <p>but now that <code>reader</code> is an executable I launch <code>processor</code> by</p>
  
  <pre><code>subprocess.call([“python”, “processor.py”])
  </code></pre>
  
  <p>How can I pass it the object with the variables red from the xml file? I don’t want to do it all as a string, because re-parsing the string would defeat the purpose of <code>reader</code></p>