mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 11:23:45 +00:00
c539b57a0e
This is only relevant on linux/unix if running the scripts from a shell. These two were the last where the call still used an unversioned python. This has no reflex on the way that lyx calls the scripts or the python version used since the #! "shebang line" is ignored.
17 lines
480 B
Python
Executable File
17 lines
480 B
Python
Executable File
#!/usr/bin/python3
|
|
|
|
from subprocess import Popen, PIPE
|
|
from sys import argv, stderr, exit
|
|
import shutil
|
|
|
|
if (len(argv) != 3):
|
|
stderr.write("Usage: %s <src_file> <dst_file>\n" % argv[0])
|
|
exit(1)
|
|
|
|
with open(argv[1], 'rb') as fsrc:
|
|
subproc = Popen("gnuplot", shell=True, stdin=PIPE)
|
|
subproc.stdin.write(b"set terminal pdf\nset output '%s'\n" % argv[2].encode())
|
|
shutil.copyfileobj(fsrc, subproc.stdin)
|
|
subproc.stdin.write(b"exit\n")
|
|
subproc.communicate()
|