Python Forum
How to "tee" (=split) output to screen and into file?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to "tee" (=split) output to screen and into file?
#5
(Jun-23-2023, 09:59 PM)Pedroski55 Wrote: The wheel has already been invented, and so has logging!
This is true of course and in general, it is probably better to log than to print. However there is a little difference: in the logging system, you emit logging 'records', there is no way to use the exact semantics of the print() function with its sep and end and flush arguments. So the print function not only outputs information, it also formats the information with lower level details. I don't know how you could plug this semantics to the logging system.
Reply


Messages In This Thread
RE: How to "tee" (=split) output to screen and into file? - by Gribouillis - Jun-24-2023, 05:33 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Why is there an output of None akbarza 1 1,334 Nov-27-2023, 02:53 PM
Last Post: deanhystad
  Reading data from excel file –> process it >>then write to another excel output file Jennifer_Jone 0 2,182 Mar-14-2023, 07:59 PM
Last Post: Jennifer_Jone
  Split pdf in pypdf based upon file regex standenman 1 4,732 Feb-03-2023, 12:01 PM
Last Post: SpongeB0B
  How to split file by same values from column from imported CSV file? Paqqno 5 6,030 Mar-24-2022, 05:25 PM
Last Post: Paqqno
  [split] Results of this program in an excel file eisamabodian 1 2,308 Feb-11-2022, 03:18 PM
Last Post: snippsat
  Formatting to output file Mark17 2 2,102 Jan-13-2022, 09:06 PM
Last Post: BashBedlam
  split txt file data on the first column value shantanu97 2 3,676 Dec-29-2021, 05:03 PM
Last Post: DeaD_EyE
  [split] Help- converting file with pyton script eltomassito 6 4,798 Jul-02-2021, 05:29 PM
Last Post: snippsat
  How do I split the output? AnunnakiKungFu 2 2,445 Feb-25-2021, 11:13 PM
Last Post: AnunnakiKungFu
  Split Characters As Lines in File quest_ 3 3,542 Dec-28-2020, 09:31 AM
Last Post: quest_

Forum Jump:

User Panel Messages

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