# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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$")
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])
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]
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
def update_language(document):
- " Update document language, if language is default convert it to
- english."
+ """ Update document language, if language is default convert it to
+ english."""
header = document.header
i = find_token(header, "\\language", 0)
if i == -1:
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