Georg Baum wrote:

> Anyway, I think we should call python with the -tt flag. The attached
> patch does that, and is going in tomorrow unless I get objections.

This updated patch is going in now.


Georg


Log:

Call python with the -tt switch to make mixed tab/space indentation an error

        * src/support/os.[Ch]
        (python): new function, return the python command

        * lib/lyx2lyx/lyx_1_5.py
        (revert_font_settings): replace tabs with spaces

The rest is simply s/python/python -tt/ and
s/"python"/lyx::support::os::python()/ where appropriate.
Index: src/graphics/GraphicsConverter.C
===================================================================
--- src/graphics/GraphicsConverter.C	(Revision 14269)
+++ src/graphics/GraphicsConverter.C	(Arbeitskopie)
@@ -21,6 +21,7 @@
 #include "support/convert.h"
 #include "support/lstrings.h"
 #include "support/lyxlib.h"
+#include "support/os.h"
 
 #include <boost/bind.hpp>
 
@@ -161,7 +162,7 @@ Converter::Impl::Impl(string const & fro
 
 	// The conversion commands are stored in a stringstream
 	ostringstream script;
-	script << "#!/usr/bin/env python\n"
+	script << "#!/usr/bin/env python -tt\n"
 		   << "import os, sys\n\n"
 		   << "def unlinkNoThrow(file):\n"
 		   << "  ''' remove a file, do not throw if an error occurs '''\n"
@@ -175,7 +176,7 @@ Converter::Impl::Impl(string const & fro
 
 	if (!success) {
 		script_command_ =
-			"python " +
+			support::os::python() + ' ' +
 			quoteName(libFileSearch("scripts", "convertDefault.py")) +
 			' ' +
 			quoteName((from_format.empty() ? "" : from_format + ':') + from_file) +
@@ -214,7 +215,8 @@ Converter::Impl::Impl(string const & fro
 		// We create a dummy command for ease of understanding of the
 		// list of forked processes.
 		// Note: 'sh ' is absolutely essential, or execvp will fail.
-		script_command_ = "python " + quoteName(script_file_) + ' ' +
+		script_command_ = support::os::python() + ' ' +
+			quoteName(script_file_) + ' ' +
 			quoteName(onlyFilename(from_file)) + ' ' +
 			quoteName(to_format);
 	}
@@ -286,7 +288,7 @@ string const move_file(string const & fr
 /*
 A typical script looks like:
 
-#!/usr/bin/env python
+#!/usr/bin/env python -tt
 import os, sys
 
 def unlinkNoThrow(file):
Index: src/converter.C
===================================================================
--- src/converter.C	(Revision 14269)
+++ src/converter.C	(Arbeitskopie)
@@ -26,6 +26,7 @@
 
 #include "support/filetools.h"
 #include "support/lyxlib.h"
+#include "support/os.h"
 #include "support/path.h"
 #include "support/systemcall.h"
 
@@ -298,7 +299,7 @@ bool Converters::convert(Buffer const * 
 				getExtension(from_file) :
 				formats.extension(from_format);
 			string const command =
-				"python " +
+				lyx::support::os::python() + ' ' +
 				quoteName(libFileSearch("scripts", "convertDefault.py")) +
 				' ' +
 				quoteName(from_ext + ':' + from_file) +
Index: src/buffer.C
===================================================================
--- src/buffer.C	(Revision 14269)
+++ src/buffer.C	(Arbeitskopie)
@@ -643,7 +643,7 @@ bool Buffer::readFile(LyXLex & lex, stri
 			return false;
 		}
 		ostringstream command;
-		command << "python " << quoteName(lyx2lyx)
+		command << os::python() << ' ' << quoteName(lyx2lyx)
 			<< " -t " << convert<string>(LYX_FORMAT)
 			<< " -o " << quoteName(tmpfile) << ' '
 			<< quoteName(filename);
Index: src/frontends/controllers/tex_helpers.C
===================================================================
--- src/frontends/controllers/tex_helpers.C	(Revision 14269)
+++ src/frontends/controllers/tex_helpers.C	(Arbeitskopie)
@@ -17,6 +17,7 @@
 #include "support/filetools.h"
 #include "support/lstrings.h"
 #include "support/lyxalgo.h"
+#include "support/os.h"
 #include "support/package.h"
 #include "support/path.h"
 #include "support/systemcall.h"
@@ -52,7 +53,7 @@ void rescanTexStyles()
 	Path p(package().user_support());
 	Systemcall one;
 	one.startscript(Systemcall::Wait,
-			"python " +
+			lyx::support::os::python() + ' ' +
 			quoteName(libFileSearch("scripts", "TeXFiles.py")));
 }
 
Index: src/support/os.h
===================================================================
--- src/support/os.h	(Revision 14269)
+++ src/support/os.h	(Arbeitskopie)
@@ -38,6 +38,9 @@ std::string current_root();
 ///
 shell_type shell();
 
+/// Name of the python interpreter
+std::string const python();
+
 /// Extract the path common to both @c p1 and @c p2. DBCS aware!
 std::string::size_type common_path(std::string const & p1, std::string const & p2);
 
Index: src/support/package.C.in
===================================================================
--- src/support/package.C.in	(Revision 14269)
+++ src/support/package.C.in	(Arbeitskopie)
@@ -152,7 +152,7 @@ Package::Package(string const & command_
 				     command_line_user_support_dir);
 
 	string const configure_script = addName(system_support(), "configure.py");
-	configure_command_ = "python " + quoteName(configure_script)
+	configure_command_ = os::python() + ' ' + quoteName(configure_script)
 	                               + with_version_suffix();
 
 	lyxerr[Debug::INIT]
Index: src/support/os.C
===================================================================
--- src/support/os.C	(Revision 14269)
+++ src/support/os.C	(Arbeitskopie)
@@ -17,3 +17,19 @@
 #else
 #include "os_unix.C"
 #endif
+
+namespace lyx {
+namespace support {
+namespace os {
+
+std::string const python()
+{
+	// Use the -tt switch so that mixed tab/whitespace indentation is
+	// an error
+	static std::string const command("python -tt");
+	return command;
+}
+
+}
+}
+}
Index: src/lyxtextclass.C
===================================================================
--- src/lyxtextclass.C	(Revision 14269)
+++ src/lyxtextclass.C	(Arbeitskopie)
@@ -24,6 +24,8 @@
 #include "support/lstrings.h"
 #include "support/lyxlib.h"
 #include "support/filetools.h"
+#include "support/os.h"
+
 #include <boost/filesystem/operations.hpp>
 namespace fs = boost::filesystem;
 
@@ -72,7 +74,7 @@ bool layout2layout(string const & filena
 	}
 
 	std::ostringstream command;
-	command << "python " << quoteName(script)
+	command << lyx::support::os::python() << ' ' << quoteName(script)
 		<< ' ' << quoteName(filename)
 		<< ' ' << quoteName(tempfile);
 	string const command_str = command.str();
Index: lib/scripts/tex_copy.py
===================================================================
--- lib/scripts/tex_copy.py	(Revision 14269)
+++ lib/scripts/tex_copy.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python -tt
 # -*- coding: iso-8859-1 -*-
 
 # file tex_copy.py
Index: lib/scripts/fig2pstex.py
===================================================================
--- lib/scripts/fig2pstex.py	(Revision 14269)
+++ lib/scripts/fig2pstex.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python -tt
 # -*- coding: iso-8859-15 -*-
 
 # file fig2pstex.py
Index: lib/scripts/layout2layout.py
===================================================================
--- lib/scripts/layout2layout.py	(Revision 14269)
+++ lib/scripts/layout2layout.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python -tt
 # -*- coding: iso-8859-1 -*-
 
 # file layout2layout.py
Index: lib/scripts/lyxpreview2bitmap.py
===================================================================
--- lib/scripts/lyxpreview2bitmap.py	(Revision 14269)
+++ lib/scripts/lyxpreview2bitmap.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python -tt
 # -*- coding: iso-8859-1 -*-
 
 # file lyxpreview2bitmap.py
Index: lib/scripts/lyxpreview_tools.py
===================================================================
--- lib/scripts/lyxpreview_tools.py	(Revision 14269)
+++ lib/scripts/lyxpreview_tools.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python -tt
 
 # file lyxpreview_tools.py
 # This file is part of LyX, the document processor.
Index: lib/scripts/fig_copy.py
===================================================================
--- lib/scripts/fig_copy.py	(Revision 14269)
+++ lib/scripts/fig_copy.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python -tt
 # -*- coding: iso-8859-15 -*-
 
 # file fig_copy.py
Index: lib/scripts/legacy_lyxpreview2ppm.py
===================================================================
--- lib/scripts/legacy_lyxpreview2ppm.py	(Revision 14269)
+++ lib/scripts/legacy_lyxpreview2ppm.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python -tt
 # -*- coding: iso-8859-1 -*-
 
 # file legacy_lyxpreview2ppm.py
Index: lib/scripts/fig2pdftex.py
===================================================================
--- lib/scripts/fig2pdftex.py	(Revision 14269)
+++ lib/scripts/fig2pdftex.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python -tt
 # -*- coding: iso-8859-15 -*-
 
 # file fig2pdf.py
Index: lib/scripts/fen2ascii.py
===================================================================
--- lib/scripts/fen2ascii.py	(Revision 14269)
+++ lib/scripts/fen2ascii.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python -tt
 
 # file fen2ascii.py
 # This file is part of LyX, the document processor.
Index: lib/scripts/TeXFiles.py
===================================================================
--- lib/scripts/TeXFiles.py	(Revision 14269)
+++ lib/scripts/TeXFiles.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python -tt
 # -*- coding: iso-8859-15 -*-
 
 # file TeXFiles.py
Index: lib/scripts/clean_dvi.py
===================================================================
--- lib/scripts/clean_dvi.py	(Revision 14269)
+++ lib/scripts/clean_dvi.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python -tt
 
 '''
 file clean_dvi.py
Index: lib/scripts/convertDefault.py
===================================================================
--- lib/scripts/convertDefault.py	(Revision 14269)
+++ lib/scripts/convertDefault.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python -tt
 # -*- coding: iso-8859-15 -*-
 
 # file convertDefault.py
Index: lib/lyx2lyx/profiling.py
===================================================================
--- lib/lyx2lyx/profiling.py	(Revision 14269)
+++ lib/lyx2lyx/profiling.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python -tt
 # -*- coding: iso-8859-1 -*-
 # Copyright (C) 2004 José Matos <[EMAIL PROTECTED]>
 #
Index: lib/lyx2lyx/lyx2lyx
===================================================================
--- lib/lyx2lyx/lyx2lyx	(Revision 14269)
+++ lib/lyx2lyx/lyx2lyx	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python -tt
 # -*- coding: iso-8859-1 -*-
 # Copyright (C) 2002-2004 José Matos <[EMAIL PROTECTED]>
 #
Index: lib/lyx2lyx/lyx_1_5.py
===================================================================
--- lib/lyx2lyx/lyx_1_5.py	(Revision 14269)
+++ lib/lyx2lyx/lyx_1_5.py	(Arbeitskopie)
@@ -139,9 +139,9 @@ def revert_font_settings(file):
             file.header.insert(insert_line, '\\fontscheme %s' % font_scheme)
             if font_default_family != 'default':
                 file.preamble.append('\\renewcommand{\\familydefault}{\\%s}' % font_default_family)
-	    if font_osf == 'true':
+            if font_osf == 'true':
                 file.warning("Ignoring `\\font_osf = true'")
-	    return
+            return
     font_scheme = 'default'
     file.header.insert(insert_line, '\\fontscheme %s' % font_scheme)
     if fonts['roman'] == 'cmr':
Index: lib/generate_contributions.py
===================================================================
--- lib/generate_contributions.py	(Revision 14269)
+++ lib/generate_contributions.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python -tt
 # -*- coding: utf-8 -*-
 
 '''
Index: lib/doc/depend.py
===================================================================
--- lib/doc/depend.py	(Revision 14269)
+++ lib/doc/depend.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python -tt
 # -*- coding: iso-8859-1 -*-
 # This file is part of the LyX Documentation
 # Copyright (C) 2004 José Matos <[EMAIL PROTECTED]>
@@ -68,7 +68,7 @@ def main(argv):
 
     # The default language is english and doesn't need any prefix
     print 'TOC.lyx: $(srcdir)/' + '.lyx $(srcdir)/'.join(possible_documents) + '.lyx'
-    print '\tPYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py'
+    print '\tPYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py'
     print
     tocs = ['TOC.lyx']
 
@@ -82,7 +82,7 @@ def main(argv):
         languages[lang].sort()
 
         print toc_name + ': $(srcdir)/' + ' $(srcdir)/'.join(languages[lang])
-        print '\tPYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py %s' % lang
+        print '\tPYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py %s' % lang
         print
 
     # Write meta-rule to call all the other rules
Index: lib/doc/doc_toc.py
===================================================================
--- lib/doc/doc_toc.py	(Revision 14269)
+++ lib/doc/doc_toc.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python -tt
 # -*- coding: iso-8859-1 -*-
 # This file is part of the LyX Documentation
 # Copyright (C) 2004 José Matos <[EMAIL PROTECTED]>
Index: lib/doc/Makefile.depend
===================================================================
--- lib/doc/Makefile.depend	(Revision 14269)
+++ lib/doc/Makefile.depend	(Arbeitskopie)
@@ -5,60 +5,60 @@
 # TOCs target, which prints all the TOC files.
 
 TOC.lyx: $(srcdir)/Intro.lyx $(srcdir)/FAQ.lyx $(srcdir)/Tutorial.lyx $(srcdir)/UserGuide.lyx $(srcdir)/Extended.lyx $(srcdir)/Customization.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py
 
 cs_TOC.lyx: $(srcdir)/cs_Tutorial.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py cs
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py cs
 
 da_TOC.lyx: $(srcdir)/da_Intro.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py da
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py da
 
 de_TOC.lyx: $(srcdir)/de_Customization.lyx $(srcdir)/de_Extended.lyx $(srcdir)/de_FAQ.lyx $(srcdir)/de_Intro.lyx $(srcdir)/de_Tutorial.lyx $(srcdir)/de_UserGuide.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py de
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py de
 
 es_TOC.lyx: $(srcdir)/es_Intro.lyx $(srcdir)/es_Tutorial.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py es
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py es
 
 eu_TOC.lyx: $(srcdir)/eu_Customization.lyx $(srcdir)/eu_Extended.lyx $(srcdir)/eu_FAQ.lyx $(srcdir)/eu_Intro.lyx $(srcdir)/eu_Tutorial.lyx $(srcdir)/eu_UserGuide.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py eu
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py eu
 
 fr_TOC.lyx: $(srcdir)/fr_Customization.lyx $(srcdir)/fr_Extended.lyx $(srcdir)/fr_FAQ.lyx $(srcdir)/fr_Intro.lyx $(srcdir)/fr_Tutorial.lyx $(srcdir)/fr_UserGuide.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py fr
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py fr
 
 he_TOC.lyx: $(srcdir)/he_Intro.lyx $(srcdir)/he_Tutorial.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py he
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py he
 
 hu_TOC.lyx: $(srcdir)/hu_Intro.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py hu
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py hu
 
 it_TOC.lyx: $(srcdir)/it_Customization.lyx $(srcdir)/it_Intro.lyx $(srcdir)/it_Tutorial.lyx $(srcdir)/it_UserGuide.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py it
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py it
 
 nb_TOC.lyx: $(srcdir)/nb_Intro.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py nb
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py nb
 
 nl_TOC.lyx: $(srcdir)/nl_Intro.lyx $(srcdir)/nl_Tutorial.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py nl
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py nl
 
 pl_TOC.lyx: $(srcdir)/pl_Extended.lyx $(srcdir)/pl_Intro.lyx $(srcdir)/pl_Tutorial.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py pl
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py pl
 
 pt_TOC.lyx: $(srcdir)/pt_Intro.lyx $(srcdir)/pt_Tutorial.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py pt
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py pt
 
 ro_TOC.lyx: $(srcdir)/ro_Intro.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py ro
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py ro
 
 ru_TOC.lyx: $(srcdir)/ru_FAQ.lyx $(srcdir)/ru_Intro.lyx $(srcdir)/ru_Tutorial.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py ru
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py ru
 
 sk_TOC.lyx: $(srcdir)/sk_Tutorial.lyx $(srcdir)/sk_UserGuide.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py sk
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py sk
 
 sl_TOC.lyx: $(srcdir)/sl_Intro.lyx $(srcdir)/sl_Tutorial.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py sl
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py sl
 
 sv_TOC.lyx: $(srcdir)/sv_Intro.lyx $(srcdir)/sv_Tutorial.lyx
-	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python $(srcdir)/doc_toc.py sv
+	PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py sv
 
 tocfiles = TOC.lyx cs_TOC.lyx da_TOC.lyx de_TOC.lyx es_TOC.lyx eu_TOC.lyx fr_TOC.lyx he_TOC.lyx hu_TOC.lyx it_TOC.lyx nb_TOC.lyx nl_TOC.lyx pl_TOC.lyx pt_TOC.lyx ro_TOC.lyx ru_TOC.lyx sk_TOC.lyx sl_TOC.lyx sv_TOC.lyx
Index: lib/configure.py
===================================================================
--- lib/configure.py	(Revision 14269)
+++ lib/configure.py	(Arbeitskopie)
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python -tt
 #
 # file configure.py
 # This file is part of LyX, the document processor.
@@ -183,7 +183,7 @@ def checkLatex():
             checkProg('DTL to DVI converter', ['dt2dv']) != ['', '']):
         # Windows only: DraftDVI
         converter_entry = r'''\converter latex      dvi2       "%%"	"latex"
-\converter dvi2       dvi        "python $$s/scripts/clean_dvi.py $$i $$o"	""'''
+\converter dvi2       dvi        "python -tt $$s/scripts/clean_dvi.py $$i $$o"	""'''
     else:
         converter_entry = r'\converter latex      dvi        "%%"	"latex"'
     path, LATEX = checkProg('a Latex2e program', ['pplatex $$i', 'latex $$i', 'latex2e $$i'],
@@ -343,7 +343,7 @@ def checkConverterEntries():
     #
     path, dvipng = checkProg('dvipng', ['dvipng'])
     if dvipng == "dvipng":
-        addToRC(r'\converter lyxpreview png        "python $$s/scripts/lyxpreview2bitmap.py"	""')
+        addToRC(r'\converter lyxpreview png        "python -tt $$s/scripts/lyxpreview2bitmap.py"	""')
     else:
         addToRC(r'\converter lyxpreview png        ""	""')
     #  
@@ -387,13 +387,13 @@ def checkConverterEntries():
     # checkProg('Image converter', ['convert $$i $$o'])
     #
     # Entried that do not need checkProg
-    addToRC(r'''\converter lyxpreview ppm        "python $$s/scripts/lyxpreview2bitmap.py"	""
+    addToRC(r'''\converter lyxpreview ppm        "python -tt $$s/scripts/lyxpreview2bitmap.py"	""
 \converter date       dateout    "date +%d-%m-%Y > $$o"	""
 \converter docbook    docbook-xml "cp $$i $$o"	"xml"
-\converter fen        asciichess "python $$s/scripts/fen2ascii.py $$i $$o"	""
-\converter fig        pdftex     "python $$s/scripts/fig2pdftex.py $$i $$o"	""
-\converter fig        pstex      "python $$s/scripts/fig2pstex.py $$i $$o"	""
-\converter lyx        lyx13x     "python $$s/lyx2lyx/lyx2lyx -t 221 $$i > $$o"	""
+\converter fen        asciichess "python -tt $$s/scripts/fen2ascii.py $$i $$o"	""
+\converter fig        pdftex     "python -tt $$s/scripts/fig2pdftex.py $$i $$o"	""
+\converter fig        pstex      "python -tt $$s/scripts/fig2pstex.py $$i $$o"	""
+\converter lyx        lyx13x     "python -tt $$s/lyx2lyx/lyx2lyx -t 221 $$i > $$o"	""
 ''')
 
 
@@ -456,9 +456,9 @@ def checkOtherEntries():
 \print_spool_command "lpr"''',
             ''])
     # Add the rest of the entries (no checkProg is required)
-    addToRC(r'''\copier    fig        "python $$s/scripts/fig_copy.py $$i $$o"
-\copier    pstex      "python $$s/scripts/tex_copy.py $$i $$o $$l"
-\copier    pdftex     "python $$s/scripts/tex_copy.py $$i $$o $$l"
+    addToRC(r'''\copier    fig        "python -tt $$s/scripts/fig_copy.py $$i $$o"
+\copier    pstex      "python -tt $$s/scripts/tex_copy.py $$i $$o $$l"
+\copier    pdftex     "python -tt $$s/scripts/tex_copy.py $$i $$o $$l"
 ''')
 
 
Index: lib/examples/listerrors.lyx
===================================================================
--- lib/examples/listerrors.lyx	(Revision 14269)
+++ lib/examples/listerrors.lyx	(Arbeitskopie)
@@ -268,7 +268,7 @@ listerrors
 
 <<listerrors>>=
 \newline
-#!/usr/bin/python
+#!/usr/bin/python -tt
 \newline
 """reformat noweb and compiler errors for LyX.
 \newline

Reply via email to