title: Passing command line argument to another file imported in Python
body: <p>I have a python file (<code>html2text.py</code>) which gives the desired result when i pass command line argument to it i.e., in the following way:</p>
  
  <pre><code>python html2text.py file.txt
  </code></pre>
  
  <ul>
  <li>where <code>file.txt</code> contains the source code of a web-site and the result is displayed on the console...</li>
  </ul>
  
  <p>I want to use it in another file (let say <code>a.py</code>) and store the result (which was getting printed on the console) in a string. </p>
  
  <p>For this I need to first import the file (<code>html2text.py</code>) in my file (<code>a.py</code>). Can anyone tell me how do I proceed further...?</p>