Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Evan Edmond
fslpy
Commits
a3be7cb8
Commit
a3be7cb8
authored
Jul 02, 2018
by
Paul McCarthy
🚵
Browse files
ENH: Process stdout wrapper forwards lines in real time.
parent
431c4d59
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/utils/run.py
View file @
a3be7cb8
...
...
@@ -107,7 +107,7 @@ def _forwardStream(in_, *outs):
omodes
=
[
getattr
(
o
,
'mode'
,
'w'
)
for
o
in
outs
]
def
realForward
():
for
line
in
i
n_
:
for
line
in
i
ter
(
in_
.
readline
,
b
''
)
:
for
i
,
o
in
enumerate
(
outs
):
if
'b'
in
omodes
[
i
]:
o
.
write
(
line
)
else
:
o
.
write
(
line
.
decode
(
'utf-8'
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment