[Python-bugs-list] [ python-Feature Requests-764188 ] setvbuf for File object

SourceForge.net noreply@sourceforge.net
Mon, 28 Jul 2003 17:27:41 -0700


Feature Requests item #764188, was opened at 2003-07-01 15:21
Message generated for change (Comment added) made by jbrouwers
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=764188&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Yue Luo (yueluo)
Assigned to: Nobody/Anonymous (nobody)
Summary: setvbuf for File object

Initial Comment:
I wonder if it is possible to add a new method setvbuf to 
File object.  The method does the same as the setvbuf() 
in stdio.h.



----------------------------------------------------------------------

Comment By: Jean M. Brouwers (jbrouwers)
Date: 2003-07-28 19:27

Message:
Logged In: YES 
user_id=832557

There is already an optional bufsize argument to file(),
open() and fdopen().  It allows you to specify unbuffered
(0), line buffered (1), system default (-1) or buffered
usage with a specific buffer size (>1).  Are you requesting
something different?

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-07-08 01:57

Message:
Logged In: YES 
user_id=21627

I see. Can you explain why invoking "python -u" is insufficient?

----------------------------------------------------------------------

Comment By: Yue Luo (yueluo)
Date: 2003-07-07 18:14

Message:
Logged In: YES 
user_id=806666

Sorry, I did not make myself clear.  I just want to be able to 
change the buffer size or the buffer mode of a file object. 
Especially, I often want to change the standard output buffer 
mode to line buffer so that I can see the result immediately 
even when the output has been redirected.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-07-07 17:08

Message:
Logged In: YES 
user_id=21627

What buf argument would you like to pass?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=764188&group_id=5470