title: how to execute .py script from bash shell
body: <p>I open a terminal and cd into my documents where I have my .py file called trianglearea.py which is a very basic program that I am trying to execute. 
  I type /Documents$ python trianglearea.py into the shell and nothing happens; bash prompts me for another command as if what I just prompted doesn't exist. I try ./trianglearea.py but I get a syntax error because I have not entered interactive python and bash doesn't understand my python script. If I go to the file gui style and double click and say run in terminal a window flashes and disappears but that is not what I want. I want to have my little program run in interactive python so I can enter stuff and actually use my function.
  This is all I have in the.py file</p>
  
  <pre><code>def area(base,height):
      ''' (number, number) - number
      Return area of a triangle with dimensions base * height
  
      &gt;&gt;&gt;&gt;area(10,5)
      25.0
      '''
      return base*height/2
  </code></pre>
  
  <p>I know this shouldn't be that hard but it has stumped me. </p>