OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Why is tqdm output directed to sys.stderr and not to sys.stdout?

  • Thread starter Thread starter Heberto Mayorquin
  • Start date Start date
H

Heberto Mayorquin

Guest
Accordingo to the python python documentation concerning sys.stdout and sys.stderr:

stdout is used for the output of print() and expression statements and for the prompts of input();
The interpreter’s own prompts and its error messages go to stderr.

Nevertheless, according to the documentation ot tqdm the default output is sys.stderr.

I am confused on why this would be the case given that it does not seem to be related to the interpreter own prompts or error messages. What am I missing? Why is tqdm output directed to sys.stderr and not to sys.stdout?

Edit: I think that the discussion here sort of answers this: When to use sys.stdout instead of sys.stderr?
<p>Accordingo to the python <a href="https://docs.python.org/3/library/sys.html" rel="nofollow noreferrer">python documentation concerning <code>sys.stdout</code> and <code>sys.stderr</code></a>:</p>
<blockquote>
<p>stdout is used for the output of print() and expression statements and for the prompts of input();</p>
</blockquote>
<blockquote>
<p>The interpreter’s own prompts and its error messages go to stderr.</p>
</blockquote>
<p>Nevertheless, according to the documentation ot <a href="https://tqdm.github.io/docs/tqdm/" rel="nofollow noreferrer">tqdm</a> the default output is sys.stderr.</p>
<p>I am confused on why this would be the case given that it does not seem to be related to the interpreter own prompts or error messages. What am I missing? Why is tqdm output directed to sys.stderr and not to sys.stdout?</p>
<p>Edit: I think that the discussion here sort of answers this:
<a href="https://stackoverflow.com/questions/35461687/when-to-use-sys-stdout-instead-of-sys-stderr">When to use sys.stdout instead of sys.stderr?</a></p>
 

Latest posts

J
Replies
0
Views
1
jbowerbir
J
V
Replies
0
Views
1
Vinicius Martin
V
Top