<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>flush = True did the trick. Thanks!</p>
<p>Pete<br>
</p>
<div class="moz-cite-prefix">On 5/11/23 13:41, jonathan hunsberger
via TriEmbed wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJWx4YjEA==kKHEKGGhStOkK6cdpaPhp77LK7pcUkp84=jd+4w@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">Probably output buffering if the script continues
running. See what happens if you set PYTHONUNBUFFERED
environment variable or add , flush=True to your print
arguments.</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, May 11, 2023, 13:31
Pete soper via TriEmbed <<a
href="mailto:triembed@triembed.org" moz-do-not-send="true"
class="moz-txt-link-freetext">triembed@triembed.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">I have some
python code that has this statement:<br>
<br>
print(f'C: {degrees_c:6.2f} F: {degrees_f:6.2f}')<br>
<br>
If I run the script from an Ubuntu bash terminal session I get
the two <br>
temperatures as expected. But if I redirect the output I get
nothing. <br>
For instance these two commands result in zero output to the
terminal or <br>
log file:<br>
<br>
./edgerBMP3XX.py >log<br>
<br>
./edgerBMP3XX.py | tee -a log<br>
<br>
What am I doing wrong? The version is 3.8.10.<br>
<br>
Pete<br>
<br>
<br>
<br>
_______________________________________________<br>
Triangle, NC Embedded Interest Group mailing list<br>
<br>
To post message: <a href="mailto:TriEmbed@triembed.org"
target="_blank" rel="noreferrer" moz-do-not-send="true"
class="moz-txt-link-freetext">TriEmbed@triembed.org</a><br>
List info: <a
href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
TriEmbed web site: <a href="https://TriEmbed.org"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true">https://TriEmbed.org</a><br>
To unsubscribe, click link and send a blank message: mailto:<a
href="mailto:unsubscribe-TriEmbed@bitser.net"
target="_blank" rel="noreferrer" moz-do-not-send="true"
class="moz-txt-link-freetext">unsubscribe-TriEmbed@bitser.net</a>?subject=unsubscribe<br>
Searchable email archive available at <a
href="https://www.mail-archive.com/triembed@triembed.org/"
rel="noreferrer noreferrer" target="_blank"
moz-do-not-send="true" class="moz-txt-link-freetext">https://www.mail-archive.com/triembed@triembed.org/</a><br>
<br>
</blockquote>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Triangle, NC Embedded Interest Group mailing list
To post message: <a class="moz-txt-link-abbreviated" href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a>
List info: <a class="moz-txt-link-freetext" href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a>
TriEmbed web site: <a class="moz-txt-link-freetext" href="https://TriEmbed.org">https://TriEmbed.org</a>
To unsubscribe, click link and send a blank message: <a class="moz-txt-link-freetext" href="mailto:unsubscribe-TriEmbed@bitser.net?subject=unsubscribe">mailto:unsubscribe-TriEmbed@bitser.net?subject=unsubscribe</a>
Searchable email archive available at <a class="moz-txt-link-freetext" href="https://www.mail-archive.com/triembed@triembed.org/">https://www.mail-archive.com/triembed@triembed.org/</a>
</pre>
</blockquote>
</body>
</html>