[[email protected] git]# ./test.py
File "./test.py", line 4
with open("/home/git/post-receive-email.log",'a') as log_file:
^
SyntaxError: invalid syntax
Код выглядит следующим образом:
[[email protected] 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")
и я использую Python 2.5.5
[[email protected] git]# python -V
Python 2.5.5