[Tutor] TKinter and IDLE problem

Poor Yorick gp@pooryorick.com
Tue Dec 10 17:52:01 2002


--------------000607000306060806090300
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

I've been doing a lot of Tkinter programming in Idle on Windows 2000, 
and I've found that the easiest way to proceed is to keep a DOS window 
open to the folder where my python source file is, and follow this sequence:

alt+f-s (saves the tkinter program in the idle window)
alt-lefttab-<enter> (switches to the command window)
<up arrow>-<enter> (recalls the previous dos command, something like 
"python myprogram.py"
alt-lefttab<enter> (when the Tkinter program finishes to get back to the 
Idle edit window)

Poor Yorick
gp@pooryorick.om

alan.gauld@bt.com wrote:

>>I've been learning Python with v2.2.2 for Windows (on Win98). 
>>I've started 
>>to try out Tkinter with the Tkinter Intro at
>>
>
>>However, IDLE then becomes unusable, even after closing both the GUI 
>>and  hello1.py (no more ">>>" appear when hitting Enter).
>>
>>What am I doing wrong?
>>
>
>Using IDLE!
>Try saving your program into a file and running it from the 
>DOS prompt - or double clicking it in explorer).
>
>IDLE is written in Tkinter and its difficult for Tkinter to run 
>two programs at the same time, it gets confused. There is a fudge 
>to get round this but then your program doesn't run right outside IDLE!
>
>Its easier IMHO to just get into the good habit of saving your Tkinter
>code as a file and running it outside IDLE. I discuss this issue in 
>passing in the GUI section of my tutorial...
>
>Alan g.
>Author of the 'Learning to Program' web site
>http://www.freenetpages.co.uk/hp/alan.gauld
>
>_______________________________________________
>Tutor maillist  -  Tutor@python.org
>http://mail.python.org/mailman/listinfo/tutor
>
>


--------------000607000306060806090300
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<html>
<head>
</head>
<body>
I've been doing a lot of Tkinter programming in Idle on Windows 2000, and
I've found that the easiest way to proceed is to keep a DOS window open to
the folder where my python source file is, and follow this sequence:<br>
<br>
alt+f-s (saves the tkinter program in the idle window)<br>
alt-lefttab-&lt;enter&gt; (switches to the command window)<br>
&lt;up arrow&gt;-&lt;enter&gt; (recalls the previous dos command, something
like "python myprogram.py"<br>
alt-lefttab&lt;enter&gt; (when the Tkinter program finishes to get back to
the Idle edit window)<br>
<br>
Poor Yorick<br>
<a class="moz-txt-link-abbreviated" href="mailto:gp@pooryorick.om">gp@pooryorick.om</a><br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:alan.gauld@bt.com">alan.gauld@bt.com</a> wrote:<br>
<blockquote type="cite" cite="mid:7497DCA1C240C042B28F6657ADFD8E09702267@i2km11-ukbr.domain1.systemhost.net">
  <blockquote type="cite">
    <pre wrap="">I've been learning Python with v2.2.2 for Windows (on Win98). <br>I've started <br>to try out Tkinter with the Tkinter Intro at<br></pre>
    </blockquote>
    <pre wrap=""><!----><br></pre>
    <blockquote type="cite">
      <pre wrap="">However, IDLE then becomes unusable, even after closing both the GUI <br>and  hello1.py (no more "&gt;&gt;&gt;" appear when hitting Enter).<br><br>What am I doing wrong?<br></pre>
      </blockquote>
      <pre wrap=""><!----><br>Using IDLE!<br>Try saving your program into a file and running it from the <br>DOS prompt - or double clicking it in explorer).<br><br>IDLE is written in Tkinter and its difficult for Tkinter to run <br>two programs at the same time, it gets confused. There is a fudge <br>to get round this but then your program doesn't run right outside IDLE!<br><br>Its easier IMHO to just get into the good habit of saving your Tkinter<br>code as a file and running it outside IDLE. I discuss this issue in <br>passing in the GUI section of my tutorial...<br><br>Alan g.<br>Author of the 'Learning to Program' web site<br><a class="moz-txt-link-freetext" href="http://www.freenetpages.co.uk/hp/alan.gauld">http://www.freenetpages.co.uk/hp/alan.gauld</a><br><br>_______________________________________________<br>Tutor maillist  -  <a class="moz-txt-link-abbreviated" href="mailto:Tutor@python.org">Tutor@python.org</a><br><a class="moz-txt-link-freetext" href="http://mail
.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor</a><br><br><br></pre>
      </blockquote>
      <br>
      </body>
      </html>

--------------000607000306060806090300--