title: Python main error
body: <pre><code>import sys
  
  def Cat(filename):
  
      f = open(filename,'rU')
      text = f.read()
      print ("text")
      f.close()
  
      def main():
          Cat(sys.argv[1])  
  
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p>I keep getting the following error shown below:</p>
  
  <pre><code>NameError: name 'main' is not defined.
  </code></pre>