Python Forum
subprocess.Popen parameter bufsize issue
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
subprocess.Popen parameter bufsize issue
#1
        args = ('D:/ProgramFiles/Python352/Scripts/pyinstaller.exe', '-w', file_full_path, '-i', ico_full_path) 
        process = subprocess.Popen(args, bufsize=1, cwd=file_path, stdout=None, stderr=subprocess.PIPE, universal_newlines=True)
        for line in process.stderr:
            print(line) 


I'm creating sublime text3 plugin,I got the same result when the parameter bufsize=0,or,1 or other int.
Something wrong?
Reply
#2
Quote:I got the same result
And what was the result?
Reply
#3
(Oct-21-2017, 10:31 AM)Larz60+ Wrote: And what was the result?
Per the Api doc,if the bufsize=1 and universal_newlines=True,means line buffered,but The output isn't available until the program completes ,it's not output by line, it seems the output is irrelevant to the 'bufsize'.
Reply
#4
https://stackoverflow.com/questions/3754...-in-python
The answer.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Information subprocess.Popen() suddenly giving me grief? davecotter 3 606 Dec-13-2023, 10:49 PM
Last Post: davecotter
  [ERROR] ParamValidationError: Parameter validation failed: Invalid type for parameter gdbengo 3 10,973 Dec-26-2022, 08:48 AM
Last Post: ibreeden
  Use subprocess.Popen and time.sleep chucky831 2 1,944 Aug-11-2022, 07:53 PM
Last Post: carecavoador
  Subprocess.Popen() not working when reading file path from csv file herwin 13 14,987 May-07-2021, 03:26 PM
Last Post: herwin
  Did subprocess.Popen() causes main routine to pause stdout? liudr 4 3,617 May-04-2021, 08:58 PM
Last Post: liudr
  disable subprocess.popen prompt echo paul18fr 1 2,003 Feb-04-2021, 02:50 AM
Last Post: Larz60+
  how to pass the interactive string to Popen subprocess maiya 1 1,876 Sep-18-2020, 09:36 PM
Last Post: Larz60+
  How to get program output from subprocess.Popen? glestwid 1 2,366 Aug-19-2020, 05:44 AM
Last Post: buran
  subprocess.Popen() and encodings voltron 0 5,735 Feb-20-2020, 04:57 PM
Last Post: voltron
  Mock call to subprocess.Popen failing with StopIteration tharpa 7 5,916 Nov-08-2019, 05:00 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

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