[wingide-users] Using stdin/stdout when debugging
Denis Kirienko
dk2009 at 179.ru
Fri Jan 29 08:28:57 MST 2010
Hello!
I am going to use WingIDE + Python 3 for teaching programming at high school.
The children will write a simple programs with standart input-output like this:
data=input().split()
print(int(data[0])+int(data[1]))
When we run this program without debugging, all looks OK, we enter
line "1 2" in the "Python shell" window and get the correct result.
But when we try to debug such application, we have a problem. Lets
start the apllication and enter the next data to the "Debug I/O
window":
1 1
2 2
3 3
4 4
5 5
After that we got an answer: 4
So there are two problems:
1. The first line of input in the debug I/O window is ignored.
2. We must enter a lot of new lines before the program being debugged
will read them from input and continue.
For example, we can enter such data in the debug I/O window:
<ENTER>
2 2<ENTER>
<ENTER>
<ENTER>
<ENTER>
And only after entering this five lines we will get an answer: 4.
Is it possible to correct the problem?
I will use Windows XP, Python 3.1.1 ang WingIDE 101 3.2.2-3.2.4.
Also I am using Linux, and have a same problems under Linux.
--
Denis
More information about the wingide-users
mailing list