You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per https://bugs.python.org/issue28373, input uses original stdout even if sys.stdout is wrapped. When students use input and pass in a prompt, stdout buffering is enabled for this even if they import the cs50 module.
One suggested workaround is to override the fileno method but not sure how reliable that is:
import cs50
input("foo") # doesn't use the overridden write method
import cs50
cs50.get_int("foo") # uses the overridden write method
The text was updated successfully, but these errors were encountered:
Per https://bugs.python.org/issue28373,
input
uses original stdout even ifsys.stdout
is wrapped. When students useinput
and pass in a prompt, stdout buffering is enabled for this even if they import thecs50
module.One suggested workaround is to override the
fileno
method but not sure how reliable that is:The text was updated successfully, but these errors were encountered: