Skip to content

Commit

Permalink
Update pyrpipe_engine.py
Browse files Browse the repository at this point in the history
  • Loading branch information
urmi-21 committed Jun 29, 2020
1 parent d98b761 commit cdd0d26
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyrpipe/pyrpipe_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ def getReturnStatus(cmd):
#prints stdout in real time. optimal for huge stdout and no stderr
def execute_commandRealtime(cmd):
"""Execute shell command and print stdout in realtime.
Example:
for output in pe.execute_commandRealtime(['ping','-c','4','google.com']):
print (output)
"""
popen = subprocess.Popen(cmd, stdout=subprocess.PIPE, universal_newlines=True)

Expand Down

0 comments on commit cdd0d26

Please sign in to comment.