From b857f8608f12c29557d6c42e2be3a908f9338e54 Mon Sep 17 00:00:00 2001 From: Sengian Date: Wed, 5 Jan 2011 08:09:28 +0100 Subject: [PATCH] Add debuging options for RTF input.py --- src/calibre/ebooks/rtf/input.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/calibre/ebooks/rtf/input.py b/src/calibre/ebooks/rtf/input.py index fdd501495b..19f944bbb5 100644 --- a/src/calibre/ebooks/rtf/input.py +++ b/src/calibre/ebooks/rtf/input.py @@ -115,6 +115,10 @@ class RTFInput(InputFormatPlugin): # Write or do not write paragraphs. Default is 0. empty_paragraphs = 1, + + #debug + # deb_dir = "D:\\Mes eBooks\\Developpement\\debug\\rtfdebug", + # run_level = 3 ) parser.parse_rtf() ans = open('out.xml').read() @@ -256,9 +260,8 @@ class RTFInput(InputFormatPlugin): raise ValueError(_('This RTF file has a feature calibre does not ' 'support. Convert it to HTML first and then try it.\n%s')%e) - '''dataxml = open('dataxml.xml', 'w') - dataxml.write(xml) - dataxml.close''' + # with open('dataxml.xml', 'w') as dataxml: + # dataxml.write(xml) d = glob.glob(os.path.join('*_rtf_pict_dir', 'picts.rtf')) if d: