Skip to content

Commit

Permalink
#485 add comments explaining why we should use sys.sysout.flush (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gloin1313 authored and bearney74 committed Mar 29, 2017
1 parent 6c2ca83 commit b214bcf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions moviepy/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

def sys_write_flush(s):
""" Writes and flushes without delay a text in the console """
# Reason for not using `print` is that in some consoles "print"
# commands get delayed, while stdout.flush are instantaneous,
# so this method is better at providing feedback.
# See https://github.com/Zulko/moviepy/pull/485
sys.stdout.write(s)
sys.stdout.flush()

Expand Down

0 comments on commit b214bcf

Please sign in to comment.