# 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.6fix3"""
+""" Convert files to the file format generated by lyx 1.1.6, fix3 and fix4"""
import re
-import string
from parser_tools import find_token, find_re
def bool_table(item):
def table_update(lines):
" Update table's internal content to format 2."
- lines[1] = string.replace(lines[1], '<Features', '<features')
+ lines[1] = lines[1].replace('<Features', '<features')
res = features_re.match( lines[1] )
if res:
val = res.groups()
i = 2
col_info = []
while i < len(lines):
- lines[i] = string.replace(lines[i], '<Cell', '<cell')
- lines[i] = string.replace(lines[i], '</Cell', '</cell')
- lines[i] = string.replace(lines[i], '<Row', '<row')
- lines[i] = string.replace(lines[i], '</Row', '</row')
- lines[i] = string.replace(lines[i], '<Column', '<column')
- lines[i] = string.replace(lines[i], '</Column', '</column')
- lines[i] = string.replace(lines[i], '</LyXTabular', '</lyxtabular')
- k = string.find (lines[i], '<column ')
+ lines[i] = lines[i].replace('<Cell', '<cell')
+ lines[i] = lines[i].replace('</Cell', '</cell')
+ lines[i] = lines[i].replace('<Row', '<row')
+ lines[i] = lines[i].replace('</Row', '</row')
+ lines[i] = lines[i].replace('<Column', '<column')
+ lines[i] = lines[i].replace('</Column', '</column')
+ lines[i] = lines[i].replace('</LyXTabular', '</lyxtabular')
+ k = lines[i].find ('<column ')
if k != -1:
col_info.append(lines[i])
del lines[i]