# Flush designer console output from Python

**URL:** <https://forum.inductiveautomation.com/t/flush-designer-console-output-from-python/5736>\
**Category:** Ignition\
**Created:** [January 24, 2013, 1:16pm UTC](https://forum.inductiveautomation.com/t/flush-designer-console-output-from-python/5736 "2013-01-24T13:16:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![systemparadox](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@systemparadox](https://forum.inductiveautomation.com/u/systemparadox)\
**Post date:** [January 24, 2013, 1:16pm UTC](https://forum.inductiveautomation.com/t/flush-designer-console-output-from-python/5736/1 "2013-01-24T13:16:02Z")

</div>

Is there any way to flush the output from Python so that the console and script playground output updates? I have a long running script and I need to see progress as it’s working. Currently the output all just appears at the end.

I tried sys.stdout.flush(), but the console output does not update.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 24, 2013, 3:25pm UTC](https://forum.inductiveautomation.com/t/flush-designer-console-output-from-python/5736/2 "2013-01-24T15:25:54Z")

</div>

Can you give us a little more context about what you’re doing and how you’re doing it?

This updates the console in real time for me:

```auto
def longRunning():
	from time import sleep
	
	for i in xrange(10):
		print "step %d" % i
		sleep(3)
		
system.util.invokeAsynchronous(longRunning)
```

---

<div class="post-metadata">

**Author:** ![systemparadox](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@systemparadox](https://forum.inductiveautomation.com/u/systemparadox)\
**Post date:** [January 24, 2013, 4:36pm UTC](https://forum.inductiveautomation.com/t/flush-designer-console-output-from-python/5736/3 "2013-01-24T16:36:10Z")

</div>

Ah yes. I was forgetting the invokeAsynchronous. That’s much better.

Thanks.
