Python Forum
Subprocess - get only first few lines of stdout
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Subprocess - get only first few lines of stdout
#3
Thanks, this is very nice :) Especially security tips (though honestly I know far too little to have an understanding of it).
Soon after I posted this I noticed you gave a similar reply in another thread.

I am on Linux, Python 3.5. How did you know/decide to use decode('utf-8'), and not 'ascii' for example?
Reply


Messages In This Thread
RE: Subprocess - get only first few lines of stdout - by j.crater - May-30-2017, 07:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [subprocess] Why stdout sent to stderr? Winfried 3 617 Jan-26-2024, 07:26 PM
Last Post: snippsat
  Performance options for sys.stdout.writelines dgrunwal 11 3,462 Aug-23-2022, 10:32 PM
Last Post: Pedroski55
  Did subprocess.Popen() causes main routine to pause stdout? liudr 4 3,819 May-04-2021, 08:58 PM
Last Post: liudr
  changing stdout and stderr Skaperen 4 2,840 Dec-02-2020, 08:58 PM
Last Post: Skaperen
  Get stdout of a running process yok0 0 3,190 Aug-20-2020, 10:12 AM
Last Post: yok0
  Iterate 2 large text files across lines and replace lines in second file medatib531 13 6,316 Aug-10-2020, 11:01 PM
Last Post: medatib531
  will with sys.stdout as f: close sys.stdout? Skaperen 9 4,881 Nov-03-2019, 07:57 AM
Last Post: Gribouillis
  Add stdout to text file maxtimbo 3 3,269 Feb-05-2019, 12:53 AM
Last Post: maxtimbo
  stdout buffering Skaperen 5 4,893 Jun-12-2018, 06:14 AM
Last Post: Skaperen
  stdout Skaperen 0 2,724 Mar-19-2018, 01:23 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