<div dir="ltr"><div class="gmail_extra">Hi, Paulo!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 11, 2016 at 10:04 AM, Paulo van Breugel <span dir="ltr"><<a href="mailto:p.vanbreugel@gmail.com" target="_blank">p.vanbreugel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div>I want to provide the output formatted in three columns. I can use <br><span style="font-family:monospace,monospace"><br>nlength = 20<br>RES = [MAPy, vif, sqrtvif]<br>print '{0[0]:{1}s} {0[1]:8.2f} {0[2]:8.2f}'.format(RES, nlength)</span><br><br></div>This prints nicely on the command line. However, on the command output tab of the GUI, the order of the printed lines is messed up.<br></div></div></blockquote><div><br></div><div>Mixing of order can happen in GUI when using both stderr and stdout. What exactly is messed up? A minimal working example is probably needed here.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><br></div>If I use instead:<span style="font-family:monospace,monospace"><br></span><br><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">nlength = 20<br></span>RES = [MAPy, vif, sqrtvif]<br><a href="http://grass.info" target="_blank">grass.info</a>('{0[0]:{1}s} {0[1]:8.2f} {0[2]:8.2f}'.format(RES, nlength))</span><br><br></div>It looks good on the command output tab, but it is printed without the fixed width.</blockquote></div><br><br></div><div class="gmail_extra">sys.stdout/print is the way. <a href="http://grass.script.info">grass.script.info</a> and others are for messages, not output, and they go to stderr which might cause mixing of order with stdout in GUI and I unfortunately don't know how to avoid it.<br><br></div><div class="gmail_extra">Vaclav<br></div></div>