mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-01 22:25:46 -04:00
graphics: Fix textgen with Python 2.
Previous fix for Python 3 broke the script under Python 2.
This commit is contained in:
parent
b37baf5abb
commit
f651c980dd
1 changed files with 8 additions and 5 deletions
|
@ -36,6 +36,7 @@
|
||||||
|
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from os import remove
|
from os import remove
|
||||||
|
from sys import stdout
|
||||||
from tempfile import mktemp
|
from tempfile import mktemp
|
||||||
import subprocess
|
import subprocess
|
||||||
import re
|
import re
|
||||||
|
@ -82,14 +83,16 @@ def invoke_command(command):
|
||||||
"""
|
"""
|
||||||
for arg in command:
|
for arg in command:
|
||||||
if arg.startswith('-'):
|
if arg.startswith('-'):
|
||||||
print("\\\n ", end='')
|
stdout.write("\\\n ")
|
||||||
|
|
||||||
if ' ' in arg:
|
if ' ' in arg or '#' in arg:
|
||||||
print("'%s'" % arg, end=' ')
|
stdout.write(repr(arg))
|
||||||
else:
|
else:
|
||||||
print(arg, end=' ')
|
stdout.write(arg)
|
||||||
|
|
||||||
print()
|
stdout.write(' ')
|
||||||
|
|
||||||
|
stdout.write('\n')
|
||||||
return subprocess.call(command)
|
return subprocess.call(command)
|
||||||
|
|
||||||
class Font(object):
|
class Font(object):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue