aitjcize / cppman

C++ 98/11/14 manual pages for Linux/MacOS
GNU General Public License v3.0
1.28k stars 79 forks source link

error happens while using cppman #9

Closed cbjs closed 11 years ago

cbjs commented 11 years ago

error: sub() got an unexpected keyword argument 'flags'

aitjcize commented 11 years ago

Hi cbjs, what python version are you using?

cbjs commented 11 years ago

2.6.5 It 's a problem of python version. upgrade to 2.7.x will solve this.

aitjcize commented 11 years ago

Thanks for reporting, I try to make cppman compatible to Python 2.6.X

cbjs commented 11 years ago

Change cppman/Formatter.py line 215 to:

tbl = re.sub(re.compile(r'T{\n(..*?)\nT}', flags=re.S), r'T{\n\E \1\nT}', tbl)

will make it ok with 2.6.x

aitjcize commented 11 years ago

I use tbl = re.compile(r'T{\n(..*?)\nT}', re.S).sub(r'T{\n\E \1\nT}', tbl) instead, thanks anyway.