]> git.lyx.org Git - features.git/commit
make python string compliant with python 2 and 3
authorJosé Matos <jamatos@lyx.org>
Tue, 9 May 2017 15:53:32 +0000 (16:53 +0100)
committerJosé Matos <jamatos@lyx.org>
Tue, 9 May 2017 15:53:32 +0000 (16:53 +0100)
commit6495cd135f15c3775613c79b008ad62f6726573e
tree226c6016b083ab0c5a1b51707da6315b63738110
parente51ccbf70d7763ef34618953f72f083edad93bed
make python string compliant with python 2 and 3

python 2 does not allow to declare a string as raw byte so we double
the backslashes and remove the r preffix

python 3 accepts rb"..." meaning a byte string that is raw. In this context
raw means that the backslash does not has any special meaning and thus it
is not escaped. This is usefull together with regular expressions where the
backslashes are special.

In the worst possible case, like this one, we must use 4 backslashes to represent
one in the regular expression...
lib/scripts/lyxpreview2bitmap.py