[Edu-sig] New problem with -Qnew and IDLE?

Gregor Lingl glingl@aon.at
Tue, 22 Jan 2002 21:45:43 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_0019_01C1A38E.24B01E90
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Has anybody an explanation vor this:

I started IDLE with the -Qnew switch.
(I have a copy of the IDLE-Icon with this switch on my desktop)
Then I did the following in IDLE's Python-Shell-Window:

>>>def ggt(a,b):
       while b:  ##### WHEN NOW I HIT ENTER,
                 ##### THE RESULT WAS:

>>> Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python22\lib\lib-tk\Tkinter.py", line 1292, in __call__
    return apply(self.func, args)
  File "C:\Python22\Tools\idle\PyShell.py", line 588, in enter_callback
    self.auto.auto_indent(event)
  File "C:\Python22\Tools\idle\AutoIndent.py", line 301, in =
newline_and_indent_event
    self.smart_indent_event(event)
  File "C:\Python22\Tools\idle\AutoIndent.py", line 208, in =
smart_indent_event
    self.reindent_to(effective + self.indentwidth)
  File "C:\Python22\Tools\idle\AutoIndent.py", line 455, in reindent_to
    text.insert("insert", self._make_blanks(column))
  File "C:\Python22\Tools\idle\AutoIndent.py", line 442, in _make_blanks
    return '\t' * ntabs + ' ' * nspaces
TypeError: unsupported operand type(s) for *: 'str' and 'float'
def ggt(a,b):
     while b:

So the cryptic Error - backtrace appeard after the >>> - Prompt=20
and BEFORE the two lines I just had typed in.

Moreover, I only could return to the >>> - prompt=20
by hitting ^C (Keybord-Interrupt)

This strange behaviour doesn't appear in ordinarily started IDLE.
It also does not appear when starting Python (with or without -Qnew)
from the MS-DOS prompt.

I feel more and more, that there is some strange instability in IDLE
connected with the -Qnew switch .

Gregor

P.S.: I'm interested in these problems, because in my opinion it is
an important, if not crucial point to have a not only simple but also
stable and reliable programming environment, when working with=20
highschool students, who are just beginning to learn to program.


------=_NextPart_000_0019_01C1A38E.24B01E90
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Has anybody an explanation vor this:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I started IDLE with the -Qnew switch.</FONT></DIV>
<DIV><FONT size=3D2>(I have a copy of the IDLE-Icon with this switch on =
my=20
desktop)</FONT></DIV>
<DIV><FONT size=3D2>Then I did the following in IDLE's=20
Python-Shell-Window:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>&gt;&gt;&gt;def=20
ggt(a,b):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while b: </FONT><FONT=20
size=3D2>&nbsp;##### WHEN NOW I HIT ENTER,</FONT></DIV>
<DIV><FONT=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
##### THE RESULT WAS:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>&gt;&gt;&gt; Exception in Tkinter =
callback<BR>Traceback (most=20
recent call last):<BR>&nbsp; File "C:\Python22\lib\lib-tk\Tkinter.py", =
line=20
1292, in __call__<BR>&nbsp;&nbsp;&nbsp; return apply(self.func, =
args)<BR>&nbsp;=20
File "C:\Python22\Tools\idle\PyShell.py", line 588, in=20
enter_callback<BR>&nbsp;&nbsp;&nbsp; =
self.auto.auto_indent(event)<BR>&nbsp; File=20
"C:\Python22\Tools\idle\AutoIndent.py", line 301, in=20
newline_and_indent_event<BR>&nbsp;&nbsp;&nbsp;=20
self.smart_indent_event(event)<BR>&nbsp; File=20
"C:\Python22\Tools\idle\AutoIndent.py", line 208, in=20
smart_indent_event<BR>&nbsp;&nbsp;&nbsp; self.reindent_to(effective +=20
self.indentwidth)<BR>&nbsp; File "C:\Python22\Tools\idle\AutoIndent.py", =
line=20
455, in reindent_to<BR>&nbsp;&nbsp;&nbsp; text.insert("insert",=20
self._make_blanks(column))<BR>&nbsp; File=20
"C:\Python22\Tools\idle\AutoIndent.py", line 442, in=20
_make_blanks<BR>&nbsp;&nbsp;&nbsp; return '\t' * ntabs + ' ' *=20
nspaces<BR>TypeError: unsupported operand type(s) for *: 'str' and=20
'float'<BR>def ggt(a,b):<BR>&nbsp;&nbsp;&nbsp;&nbsp; while =
b:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>So the cryptic Error - backtrace appeard&nbsp;after =
the=20
&gt;&gt;&gt; - Prompt </FONT></DIV>
<DIV><FONT size=3D2>and BEFORE the two lines I just had typed =
in.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Moreover, I only could return to the &gt;&gt;&gt; - =
prompt=20
</FONT></DIV>
<DIV><FONT size=3D2>by hitting ^C (Keybord-Interrupt)</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>This strange behaviour doesn't appear in ordinarily =
started=20
IDLE.</FONT></DIV>
<DIV><FONT size=3D2>It also does not appear when starting Python (with =
or without=20
-Qnew)</FONT></DIV>
<DIV><FONT size=3D2>from the MS-DOS prompt.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I feel more and more, that there is some strange =
instability=20
in IDLE</FONT></DIV>
<DIV><FONT size=3D2>connected with </FONT><FONT size=3D2>the -Qnew =
switch=20
.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Gregor</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>P.S.: I'm interested in these problems, because in =
my opinion=20
it is</FONT></DIV>
<DIV><FONT size=3D2>an important, if not crucial point to have a not =
only simple=20
but also</FONT></DIV>
<DIV><FONT size=3D2>stable and reliable </FONT><FONT =
size=3D2>programming=20
environment, when working with </FONT></DIV>
<DIV><FONT size=3D2>highschool students, who are just beginning to learn =
to=20
program.</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;</DIV></FONT></BODY></HTML>

------=_NextPart_000_0019_01C1A38E.24B01E90--