This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Set softspace to 0 in raw_input()
Type: Stage:
Components: Interpreter Core Versions: Python 2.3
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: loewis, niemeyer
Priority: normal Keywords: patch

Created on 2002-04-29 14:39 by niemeyer, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-2.3a0-softrawinput.patch niemeyer, 2002-04-29 14:39
python-2.3a0-softrawinput.patch niemeyer, 2002-05-03 17:53 Version 2
python-2.3a0-softrawinput.patch niemeyer, 2002-05-03 19:07 Version 3
Messages (6)
msg39749 - (view) Author: Gustavo Niemeyer (niemeyer) * (Python committer) Date: 2002-04-29 14:39
Setting softspace to 0 in raw_input() makes it 
behave as expected when a "print 'something'," 
precedes the raw_input() call, with or without a 
prompt argument. 
msg39750 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-05-03 06:04
Logged In: YES 
user_id=21627

The checking logic for a lost stdout appears to be broken:
it should already check for an exception right when
verifying whether stdout isatty. Can you incorporate such
cleanup in your patch?
msg39751 - (view) Author: Gustavo Niemeyer (niemeyer) * (Python committer) Date: 2002-05-03 17:53
Logged In: YES 
user_id=7887

Sure! Here's a fixed patch including those cleanups. 
 
Thank you! 
msg39752 - (view) Author: Gustavo Niemeyer (niemeyer) * (Python committer) Date: 2002-05-03 18:45
Logged In: YES 
user_id=7887

Please, don't apply it yet. I'm testing some aspects of 
the patch. 
msg39753 - (view) Author: Gustavo Niemeyer (niemeyer) * (Python committer) Date: 2002-05-03 19:07
Logged In: YES 
user_id=7887

Ok.. now it outputs an extra space if softspace was true, 
as expected after a "print 'something',". 
 
Thanks again. 
msg39754 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-08-14 15:46
Logged In: YES 
user_id=21627

Thanks for the patch, applied as bltinmodule.c 2.263.
History
Date User Action Args
2022-04-10 16:05:16adminsetgithub: 36519
2002-04-29 14:39:46niemeyercreate