[TriEmbed] Python print problem
Pete soper
pete at soper.us
Thu May 11 12:48:58 CDT 2023
flush = True did the trick. Thanks!
Pete
On 5/11/23 13:41, jonathan hunsberger via TriEmbed wrote:
> 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.
>
> On Thu, May 11, 2023, 13:31 Pete soper via TriEmbed
> <triembed at triembed.org> wrote:
>
> I have some python code that has this statement:
>
> print(f'C: {degrees_c:6.2f} F: {degrees_f:6.2f}')
>
> If I run the script from an Ubuntu bash terminal session I get the
> two
> temperatures as expected. But if I redirect the output I get nothing.
> For instance these two commands result in zero output to the
> terminal or
> log file:
>
> ./edgerBMP3XX.py >log
>
> ./edgerBMP3XX.py | tee -a log
>
> What am I doing wrong? The version is 3.8.10.
>
> Pete
>
>
>
> _______________________________________________
> Triangle, NC Embedded Interest Group mailing list
>
> To post message: TriEmbed at triembed.org
> List info:
> http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site: https://TriEmbed.org <https://TriEmbed.org>
> To unsubscribe, click link and send a blank message:
> mailto:unsubscribe-TriEmbed at bitser.net?subject=unsubscribe
> Searchable email archive available at
> https://www.mail-archive.com/triembed@triembed.org/
>
>
> _______________________________________________
> Triangle, NC Embedded Interest Group mailing list
>
> To post message:TriEmbed at triembed.org
> List info:http://mail.triembed.org/mailman/listinfo/triembed_triembed.org
> TriEmbed web site:https://TriEmbed.org
> To unsubscribe, click link and send a blank message:mailto:unsubscribe-TriEmbed at bitser.net?subject=unsubscribe
> Searchable email archive available athttps://www.mail-archive.com/triembed@triembed.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20230511/5c0b4a04/attachment.htm>
More information about the TriEmbed
mailing list