weechat/scripts

grep.py not loading with stdout/stderr error

Closed this issue · 3 comments

Hi all,

I have the following issue loading grep.py with weechat or via /python load grep.py

python: loading script "/home/wfoster/.weechat/python/autoload/grep.py"
python: stdout/stderr (?):   File "/home/wfoster/.weechat/python/autoload/grep.py", line 661
python: stdout/stderr (?):     except Exception, e:
python: stdout/stderr (?):                     ^
python: stdout/stderr (?): SyntaxError: invalid syntax
python: unable to parse file "/home/wfoster/.weechat/python/autoload/grep.py"

I've tried specifying both python2 and python3 as well.

Version weechat-2.4-1.fc30.x86_64
Python Python 3.7.3 and Python 2.7.16

Script is not yet python3 compatible. The error you pasted is an error when you try to
load script with python3 plugin. I can not reproduce with python 2.7.16.

I've gotten things to load in Python3 with a few changes, removing some whitespace and have it loading I am just not 100% the grep return data is working:

sadsfae@38d64da

I can submit a WIP PR if it helps.

Hi,
The script has been updated to be compatible with Python 3, the latest version 0.8.2 should work fine (see: b8394d6).