title: how to extract data from a code using python
body: <p>I have some functions, as .txt files which are written using easy language and I need to extract data from those functions using python. as an example consider the following part.</p>
  
  <p>code segment - </p>
  
  <pre><code>If MarketPosition = 0 and (EntriesToday(Date) &lt; 1 or EndofSess) and
  EntCondL 
  then begin
      Buy("EnStop-L") NShares shares next bar at EntPrL stop;
  end;
  </code></pre>
  
  <p>in here, I need to extract the parts</p>
  
  <ul>
  <li><strong>MarketPosition = 0</strong> </li>
  <li><strong>EntriesToday(Date) &lt; 1</strong> </li>
  <li><strong>EndofSess</strong></li>
  <li><strong>EntCondL</strong></li>
  </ul>
  
  <p>and identify <code>=</code>, <code>&lt;</code> signs using python.
  thanks in advance.</p>