]> git.lyx.org Git - lyx.git/blobdiff - lib/scripts/gnuplot2pdf.py
Create Chapter 6 Bullets in Additional.lyx and move the bullet section into it; this...
[lyx.git] / lib / scripts / gnuplot2pdf.py
index fb036b2df5a758fada52e6a9dfc1bf853a238411..3ada4f5ed59161b336c18403122b8f0690c0a55f 100755 (executable)
@@ -1,8 +1,7 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from subprocess import Popen, PIPE
 from sys import argv, stderr, exit
-import os
 import shutil
 
 if (len(argv) != 3):
@@ -11,7 +10,7 @@ if (len(argv) != 3):
 
 with open(argv[1], 'rb') as fsrc:
     subproc = Popen("gnuplot", shell=True, stdin=PIPE)
-    subproc.stdin.write("set terminal pdf\nset output '%s'\n" % argv[2])
+    subproc.stdin.write(b"set terminal pdf\nset output '%s'\n" % argv[2].encode())
     shutil.copyfileobj(fsrc, subproc.stdin)
-    subproc.stdin.write("exit\n")
-    subproc.wait()
+    subproc.stdin.write(b"exit\n")
+    subproc.communicate()