Reputation: 10685
I'm writing small bits of code inside org-mode
files. This bits of code are slow (copy files from remote machines) and I wish to see how the copy progress (sometimes the connection to the remote machine fails and I wish to know). For that, I want to print the serial number of the currently accessed file.
Org-mode's code-block have two problems with this:
Is there a way to get the printed output to a separated, live variable?
Upvotes: 4
Views: 506
Reputation: 753
Reopening sys.stdout so that it is flushed should help.
See How to flush output of Python print?, and this blog post:
http://algorithmicallyrandom.blogspot.com.es/2009/10/python-tips-and-tricks-flushing-stdout.html
Upvotes: 0