I tried Logwatch 0.9.2 on Debian/Zope 2.5 Changed lines: 481,540,546 for my Z2.log file location "/local/zope/var/Z2.log" Received the following error after running: python ./logwatch.py -m curses -l /local/zope/var/Z2.log -u 60 -n 500 File "./logwatch.py", line 146 self.results[self.item[tupleindex]] += 1 ^ SyntaxError: invalid syntax *************************** (See attached file: logwatch.py) Eric Dunn
you are using the wrong python version it seems. you are trying to run a program written for python2.x on python 1.x jens On Monday, June 24, 2002, at 08:29 , eric.n.dunn@bankofamerica.com wrote:
I tried Logwatch 0.9.2 on Debian/Zope 2.5
Changed lines: 481,540,546 for my Z2.log file location "/local/zope/var/Z2.log"
Received the following error after running: python ./logwatch.py -m curses -l /local/zope/var/Z2.log -u 60 -n 500
File "./logwatch.py", line 146 self.results[self.item[tupleindex]] += 1 ^ SyntaxError: invalid syntax
*************************** (See attached file: logwatch.py)
Eric Dunn
Jens is right. I'm using syntax that works only with Python 2+ there. Since you use Zope 2.5, you've got Python 2.1 installed on your server. You could use the command "whereis python2" to find a path to that version. On my Debian Woody box, I can invoke 2.1 directly through /usr/bin/python2.1. So, to run Logwatch, you can use: /usr/bin/python2.1 ./logwatch.py -m curses -l /local/zope/var/Z2.log -u 60 -n 500 Have fun with Logwatch! Howard Hansen http://howardsmusings.com P.S. You don't need to make any changes to the code to use a different log file. ----- Original Message ----- From: "Jens Vagelpohl" <jens@zope.com> To: <eric.n.dunn@bankofamerica.com> Cc: <zope@halfmagic.com>; <zope@zope.org> Sent: Monday, June 24, 2002 5:54 AM Subject: Re: [Zope] (no subject)
you are using the wrong python version it seems. you are trying to run a program written for python2.x on python 1.x
jens
On Monday, June 24, 2002, at 08:29 , eric.n.dunn@bankofamerica.com wrote:
I tried Logwatch 0.9.2 on Debian/Zope 2.5
Changed lines: 481,540,546 for my Z2.log file location "/local/zope/var/Z2.log"
Received the following error after running: python ./logwatch.py -m curses -l /local/zope/var/Z2.log -u 60 -n 500
File "./logwatch.py", line 146 self.results[self.item[tupleindex]] += 1 ^ SyntaxError: invalid syntax
*************************** (See attached file: logwatch.py)
Eric Dunn
participants (3)
-
eric.n.dunn@bankofamerica.com -
Howard Hansen -
Jens Vagelpohl