title: How can I pass a filename as a parameter into my module?
body: <p>I have the following code in .py file:</p>
  
  <pre><code>import re
  
  regex = re.compile(
      r"""ULLAT:\ (?P&lt;ullat&gt;-?[\d.]+).*?
      ULLON:\ (?P&lt;ullon&gt;-?[\d.]+).*?
      LRLAT:\ (?P&lt;lrlat&gt;-?[\d.]+)""", re.DOTALL|re.VERBOSE)
  </code></pre>
  
  <p>I have the data in .txt file as a sequence:</p>
  
  <pre><code>QUADNAME: rockport_colony_SD
  RESOLUTION: 10 ULLAT: 43.625 ULLON:
  -97.87527466 LRLAT: 43.5 LRLON: -97.75027466 HDATUM: 27 ZMIN: 361.58401489 ZMAX: 413.38400269 ZMEAN: 396.1293335 ZSIGMA: 12.36359215 PMETHOD: 5 QUADDATE: 20001001
  </code></pre>
  
  <p>How can I use the Python -file to process the .txt -file? </p>
  
  <p>I guess that we need a parameter in the .py file, so that we can use a syntax like in terminal: </p>
  
  <pre><code>$ py-file file-to-be-processed
  </code></pre>
  
  <p>This question was raised by the post <a href="https://stackoverflow.com/questions/489901/how-can-i-extract-x-y-and-z-coordinates-from-geographical-data-by-python/490347#490347">here</a>.</p>