title: Syntax error when using "with open" in Python (python newbie)
body: <pre><code>[root@234571-app2 git]# ./test.py 
    File "./test.py", line 4
      with open("/home/git/post-receive-email.log",'a') as log_file:
              ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>The code looks like this:</p>
  
  <pre><code>[root@234571-app2 git]# more test.py 
  #!/usr/bin/python
  from __future__ import with_statement
  
  with open("/home/git/post-receive-email.log",'a') as log_file:
      log_file.write("hello world")
  </code></pre>
  
  <p>and I am using Python 2.5.5</p>
  
  <pre><code>[root@234571-app2 git]# python -V
  Python 2.5.5
  </code></pre>