Python Forum
how to output to stderr from inside a generator?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to output to stderr from inside a generator?
#1
how to output to stderr from inside a generator? i have some error messages and status messages to output. i get no output at all.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
print('And the error is?', file=sys.stderr)
Reply
#3
did that. no output.

my bad. had the wrong indent and the print ended up in an else: that was never used. work ok, now.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [subprocess] Why stdout sent to stderr? Winfried 3 421 Jan-26-2024, 07:26 PM
Last Post: snippsat
  stderr redirect to file fmr300 2 3,496 Apr-03-2021, 01:31 AM
Last Post: fmr300
  changing stdout and stderr Skaperen 4 2,645 Dec-02-2020, 08:58 PM
Last Post: Skaperen
  Yield generator weird output Vidar567 8 3,197 Nov-23-2020, 10:59 PM
Last Post: deanhystad
  connot write to sys.stderr anne 7 2,796 Jul-31-2020, 12:39 AM
Last Post: millpond
  Random Password Generator with Weird Output. Why? Selenestica 2 2,545 Sep-11-2019, 04:36 AM
Last Post: Selenestica
  receive from a generator, send to a generator Skaperen 9 5,423 Feb-05-2018, 06:26 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020