diff options
| author | Lex Neva <github.com@lexneva.name> | 2019-02-14 20:25:36 -0500 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2019-02-16 16:53:38 -0500 |
| commit | 754c2aa63af84a25efc401e8f364deb660361e98 (patch) | |
| tree | 86d961588863cb0167b7e1a3cda08f2b5d6c5ffc /stub.py | |
| parent | 52bf2c80b66889d471745260bf1679289d1c59e3 (diff) | |
fix stub output handling
Diffstat (limited to 'stub.py')
| -rw-r--r-- | stub.py | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,10 +1,11 @@ #!/usr/bin/env python -import sys import os import subprocess +import sys import traceback + # ink/stitch # # stub.py: pyinstaller execution stub @@ -15,7 +16,6 @@ import traceback # This Python script exists only to execute the actual extension binary. It # can be copied to, e.g., "embroider_params.py", in which case it will look # for a binary at inkstitch/bin/embroider_params. - script_name = os.path.basename(__file__) if script_name.endswith('.py'): @@ -48,12 +48,12 @@ if sys.platform == "win32": import msvcrt msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) -stdout = stdout.strip() -if stdout: - print stdout.strip(), +sys.stdout.write(stdout) +sys.stdout.flush() stderr = stderr.strip() if stderr: - print >> sys.stderr, stderr.strip(), + sys.stderr.write(stderr.strip()) + sys.stderr.flush() sys.exit(extension.returncode) |
