X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Flyx2lyx%2Flyx_1_1_6_0.py;h=6c099ae772168e81cee77edda0dc793492f5e619;hb=4e7f6949bf6b9533a3be8ff90c6dc3d1abd26f4a;hp=1322029c47083878d728c103c96252e63325fe77;hpb=b00206e88239dfe8ffa0fc661efb58636f418f4e;p=lyx.git diff --git a/lib/lyx2lyx/lyx_1_1_6_0.py b/lib/lyx2lyx/lyx_1_1_6_0.py index 1322029c47..6c099ae772 100644 --- a/lib/lyx2lyx/lyx_1_1_6_0.py +++ b/lib/lyx2lyx/lyx_1_1_6_0.py @@ -14,12 +14,11 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -""" Convert files to the file format generated by lyx 1.1.6""" +""" Convert files to the file format generated by lyx 1.1.6, until fix2""" import re -import string from parser_tools import find_re, find_tokens, find_token, check_token lyxtable_re = re.compile(r".*\\LyXTable$") @@ -27,7 +26,7 @@ def update_tabular(document): " Update tabular to version 1 (xml like syntax). " lines = document.body i=0 - while 1: + while True: i = find_re(lines, lyxtable_re, i) if i == -1: break @@ -43,7 +42,7 @@ def update_tabular(document): i = i + 1 lines[i] = "\\begin_inset Tabular" i = i + 1 - head = string.split(lines[i]) + head = lines[i].split() rows = int(head[0]) columns = int(head[1]) @@ -56,8 +55,8 @@ def update_tabular(document): row_info = [] cont_row = [] for j in range(rows): - row_info.append(string.split(lines[i])) - if string.split(lines[i])[2] == '1': + row_info.append(lines[i].split()) + if lines[i].split()[2] == '1': cont_row.append(j) del lines[i] @@ -116,7 +115,7 @@ def update_tabular(document): del lines[i] end = end -1 - if string.find(lines[i],'\\newline') != -1: + if lines[i].find('\\newline') != -1: del lines[i] l = l + 1 @@ -275,7 +274,7 @@ def update_language(document): header.append('\\language english') return # This is the lyx behaviour: defaults to english - if string.split(header[i])[1] == 'default': + if header[i].split()[1] == 'default': header[i] = '\\language english' return