﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29533	Flushing stdout in django-admin command	David Ruggles	nobody	"I'm writing django-admin commands that are used interactively on the command line. According to the documentation, I should use 
{{{
self.stdout.write
}}}
instead of 
{{{
print
}}}
I ran into a case where I wanted to print multiple dots on a line to provide a rudimentary progress indicator. I set 
{{{
ending=''
}}}
and quickly discovered that the output is buffered. With print I could do 
{{{
print('.', end='', flush=True)
}}}
and it would work. Or I could do 
{{{
sys.stdout.flush()
}}}
so I tried 
{{{
self.stdout.flush()
}}}
with no change. I dug into the code and found that the flush method is simply coming from **IOBase** and is a pass. So I modified **OutputWrapper** by adding the following method:
{{{
def flush(self):
    self._out.flush()
}}}

This did want I wanted, but could there be unintended consequences? If not, would this be a reasonable patch?"	New feature	closed	Core (Management commands)	2.0	Normal	wontfix			Unreviewed	0	0	0	0	0	0
