]> git.lyx.org Git - lyx.git/blobdiff - lib/scripts/fig2pdftex.py
Update Python scripts to Python 3+
[lyx.git] / lib / scripts / fig2pdftex.py
index 10e9c5a89d3a68c7db32bdf30402b2b757114868..c7188d8e43dd0e972f85a954e5d58c66f5f18558 100644 (file)
@@ -1,5 +1,3 @@
-# -*- coding: utf-8 -*-
-
 # file fig2pdf.py
 # This file is part of LyX, the document processor.
 # Licence details can be found in the file COPYING.
@@ -26,7 +24,6 @@
 #   the real pdf file will be overwritten by a tex file named file.pdf.
 #
 
-from __future__ import print_function
 import os, sys, re
 
 
@@ -64,13 +61,13 @@ if 'pdftex_t' in help_msg:
     # Modern versions of xfig can output the image without "special" text as
     # a PDF file ${base}.pdf and place the text in a LaTeX file
     # ${base}.pdftex_t for typesetting by pdflatex itself.
-    runCommand('fig2dev -Lpdftex -p1 %s %s.pdf' % (input, outbase))
-    runCommand('fig2dev -Lpdftex_t -p%s %s %s' % (outbase, input, output))
+    runCommand(f'fig2dev -Lpdftex -p1 {input} {outbase}.pdf')
+    runCommand(f'fig2dev -Lpdftex_t -p{outbase} {input} {output}')
 else:
     # Older versions of xfig cannot do this, so we emulate the behaviour using
     # pstex and pstex_t output.
-    runCommand('fig2dev -Lpstex %s %s.pstex' % (input, outbase))
-    runCommand('fig2dev -Lpstex_t -p %s %s %s' % (outbase, input, output))
+    runCommand(f'fig2dev -Lpstex {input} {outbase}.pstex')
+    runCommand(f'fig2dev -Lpstex_t -p {outbase} {input} {output}')
 
     # manipulates the Bounding Box info to enable gs to produce
     # the appropriate PDF file from an EPS one.