When I not check “Debug in separate console” in Project Preferences
and run this file in “Debug Output” I can type:
200 100
Ctrl-D
and output will be:
‘Average is 150.0’
But when I check “Debug in separate console” in Project Preferences
and run this file in separate console I got an error:
File “C:\komodo\average.py”, line 5, in
import stdio
File “C:\komodo\stdio.py”, line 31, in
sys.stdin = open(sys.stdin.fileno(), ‘r’, newline=None)
io.UnsupportedOperation: fileno
I guess Komodo changes the sys.stdin object when you’re using “Debug in separate console” so this is why your code does not work. IDLE has the same problem:
It does indeed change your STDIN for debugging purposes, nice digging @Defman. I don’t think this is something we can easily fix on our end. Is there a reason you can’t debug the code from within Komodo?
I’m just learning Python from Sedgwick’s book. I can debug the code from within Komodo, but for graphic output I need separate console. THE BEST PYTHON IDE will be much better with such functionality. Аgain, it works in Windows for Python 2.7 (Language: “Python” in Project Preferences ). I get 3 different results on Mac for such configuration: