[Tutor] raw_input / idle problems

Flinsch, Alex AFlinsch@njeb.att.com
Mon, 7 Jun 1999 12:01:28 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01BEB0FE.90BC0318
Content-Type: text/plain

I posted the following to comp.lang.python a few days ago, but have not
received a good answer yet. I thought that I would try here also.

If I enter the following code (or any other using raw_input for that matter)
into idle's shell it works, when trying to run it from a file (new window,
edit it, save it then run it, nada)

def f():
    x=raw_input("ladida:")
    print x

f()


If typed directly or imported into idle it does work. When doing the
following it did not work (specifically the print statement was never
executed)

Ctrl-N (New Window)
type in the code
Ctrl-S (Save)
F5    (Run module)

The systems involved are a win98 and an nt4 machines, tcl version 8.0.5,
Python 1.5.2. The same code works under the plain Python interactive shell,
and pythonwin, but not idle. Any ideas, or is this just a bug in idle?

-- 
Alex Flinsch
Wefos Bar Bill Render - Development
732-519-4843


------_=_NextPart_001_01BEB0FE.90BC0318
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2448.0">
<TITLE>raw_input / idle problems</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">I posted the following to =
comp.lang.python a few days ago, but have not received a good answer =
yet. I thought that I would try here also.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">If I enter the following code (or any =
other using raw_input for that matter) into idle's shell it works, when =
trying to run it from a file (new window, edit it, save it then run it, =
nada)</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">def f():</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; =
x=3Draw_input(&quot;ladida:&quot;)</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; print x</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">f()</FONT>
</P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">If typed directly or imported into =
idle it does work. When doing the following it did not work =
(specifically the print statement was never executed)</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Ctrl-N (New Window)</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">type in the code</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Ctrl-S (Save)</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">F5&nbsp;&nbsp;&nbsp; (Run =
module)</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">The systems involved are a win98 and =
an nt4 machines, tcl version 8.0.5, Python 1.5.2. The same code works =
under the plain Python interactive shell, and pythonwin, but not idle. =
Any ideas, or is this just a bug in idle?</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">-- </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Alex Flinsch</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Wefos Bar Bill Render - =
Development</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">732-519-4843</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01BEB0FE.90BC0318--