mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-15 23:49:37 +00:00
3f03f0a447
The change is only relevant to development as all the call to python scripts is done calling C++ os::python that invoques the appropriate python version. The change is two fold, on one hand remove all the uses of /usr/bin/env for python. On the other hand rename all the calls to python from python to python3 making it explicit and being compliant with PEP 394 -- The "python" Command on Unix-Like Systems: https://www.python.org/dev/peps/pep-0394/ Remove the sheebang from src/graphics/GraphicsConverter.cpp because it is not necessary. Some small whitespace changes.
18 lines
385 B
Python
18 lines
385 B
Python
#! /usr/bin/python3
|
|
|
|
###############
|
|
import sys
|
|
|
|
for fname in sys.argv[1:]:
|
|
infile = open( fname, "rb" )
|
|
instr = infile.read()
|
|
infile.close()
|
|
outstr = instr.replace( b"\r\n", b"\n" ).replace( b"\r", b"\n" ).replace( b"\n", b"\r\n" )
|
|
|
|
if len(outstr) == len(instr):
|
|
continue
|
|
|
|
outfile = open( fname , "wb" )
|
|
outfile.write( outstr )
|
|
outfile.close()
|