When I use open()
in python 2.4.3, i get the following error
File "/tmp/chgjdbcconfig.py", line 16 with open("text.new", "wt") as fout: ^ SyntaxError: invalid syntax
I checked the python version and this is my output
Python 2.4.3
I was looking for advice on what could be the alternative. I am trying to edit lines in an XML file on a linux server and I have no control over the upgrades of the python version.
Any advice would be great!