Bugs item #1563079, was opened at 2006-09-21 13:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1563079&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Nobody/Anonymous (nobody)
Summary: code.InteractiveConsole() and closed sys.stdout

Initial Comment:
This code raises a ValueError:

  import code
  c = code.InteractiveConsole()
  c.interact()
  import sys
  sys.stdout.close()

because the InteractiveConsole uses raw_input() to
display its prompt.  I'm not sure where the correct
place to fix this is.  One possible way is to allow
raw_input() to take optional arguments to use instead
of sys.stdin and sys.stdout.  Another (easier?) way
to fix this problem might be to beef up
InteractiveConsole.raw_input() a bit.  I'm open to
either option, but I think InteractiveConsole needs
to continue working even if the user closes
sys.stdout.

This applies to the 2.4 and 2.5 branches as well as
the trunk.



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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1563079&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to