Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77951 > unrolled thread

the python shell window is already executing a command

Started bySeymore4Head <Seymore4Head@Hotmail.invalid>
First post2014-09-16 22:17 -0400
Last post2014-09-18 16:50 +0000
Articles 13 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  the python shell window is already executing a command Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-16 22:17 -0400
    Re: the python shell window is already executing a command Terry Reedy <tjreedy@udel.edu> - 2014-09-17 04:02 -0400
      Re: the python shell window is already executing a command Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-17 11:55 -0400
        Re: the python shell window is already executing a command Terry Reedy <tjreedy@udel.edu> - 2014-09-17 18:56 -0400
          Re: the python shell window is already executing a command Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-17 21:34 -0400
            Re: the python shell window is already executing a command Terry Reedy <tjreedy@udel.edu> - 2014-09-17 23:50 -0400
              Re: the python shell window is already executing a command Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-18 11:24 -0400
                Re: the python shell window is already executing a command Terry Reedy <tjreedy@udel.edu> - 2014-09-18 15:05 -0400
                  Re: the python shell window is already executing a command Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-18 15:58 -0400
                Re: the python shell window is already executing a command Chris Angelico <rosuav@gmail.com> - 2014-09-19 12:51 +1000
                Re: the python shell window is already executing a command Terry Reedy <tjreedy@udel.edu> - 2014-09-19 15:43 -0400
                Re: the python shell window is already executing a command Chris Angelico <rosuav@gmail.com> - 2014-09-20 05:47 +1000
    Re: the python shell window is already executing a command Tony the Tiger <tony@tiger.invalid> - 2014-09-18 16:50 +0000

#77951 — the python shell window is already executing a command

FromSeymore4Head <Seymore4Head@Hotmail.invalid>
Date2014-09-16 22:17 -0400
Subjectthe python shell window is already executing a command
Message-ID<4jrh1adtbsvnr9o20r9k3hfe4nkrkps2dk@4ax.com>
I have googled for a solution to this problem.  None I have tried
worked.

I have a very short program that runs for a count of 20 and ends.
What I do is click on the IDLE window and without making any changes I
just hit f5 to rerun the program.

Sometimes I get the error "the python shell window is already
executing a command" and sometimes not.

I am using XP and Python 3.4.1.

Is there a way to rerun a program without getting this error?

[toc] | [next] | [standalone]


#77952

FromTerry Reedy <tjreedy@udel.edu>
Date2014-09-17 04:02 -0400
Message-ID<mailman.14068.1410940978.18130.python-list@python.org>
In reply to#77951
On 9/16/2014 10:17 PM, Seymore4Head wrote:
> I have googled for a solution to this problem.  None I have tried
> worked.
>
> I have a very short program that runs for a count of 20 and ends.
> What I do is click on the IDLE window and without making any changes I
> just hit f5 to rerun the program.

Do you mean click on the Idle editor window?

> Sometimes I get the error "the python shell window is already
> executing a command" and sometimes not.
>
> I am using XP and Python 3.4.1.
>
> Is there a way to rerun a program without getting this error?

Normally, hitting f5 kills the previous process if it is still running 
and starts the one in the editor.  Please post a minimal program that 
exhibits the problem.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#77973

FromSeymore4Head <Seymore4Head@Hotmail.invalid>
Date2014-09-17 11:55 -0400
Message-ID<lsaj1a5pm5k301k9ipn6fcsra5c776bs1q@4ax.com>
In reply to#77952
On Wed, 17 Sep 2014 04:02:16 -0400, Terry Reedy <tjreedy@udel.edu>
wrote:

>On 9/16/2014 10:17 PM, Seymore4Head wrote:
>> I have googled for a solution to this problem.  None I have tried
>> worked.
>>
>> I have a very short program that runs for a count of 20 and ends.
>> What I do is click on the IDLE window and without making any changes I
>> just hit f5 to rerun the program.
>
>Do you mean click on the Idle editor window?
>
>> Sometimes I get the error "the python shell window is already
>> executing a command" and sometimes not.
>>
>> I am using XP and Python 3.4.1.
>>
>> Is there a way to rerun a program without getting this error?
>
>Normally, hitting f5 kills the previous process if it is still running 
>and starts the one in the editor.  Please post a minimal program that 
>exhibits the problem.

It happens in almost every program I have written.  I just tried this
one again.  I could run the program by pushing f5.  The first couple
of times it would run again by switching back to IDLE and pressing f5,
but after the second or third time, it gives an error that the python
shell window is already executing a command.

If I make a change to the program, like adding or deleting a 0 from
"rounds" the program will run without generating an error, but if I
try to re run the program without changing anything, I get the error
almost every time.


Here is one.

import random
count =0
rounds=1000
heads=0
tails=0
ht=[0,1]
while count<rounds:
    coin=random.choice(ht)
    if coin == 0:
        heads=heads+1
    elif coin == 1:
        tails=tails+1
    count = count + 1
print (heads,tails)
print ('Heads {:.2%} Tails "{:.2%} "'.format(heads/rounds,
tails/rounds))

[toc] | [prev] | [next] | [standalone]


#77985

FromTerry Reedy <tjreedy@udel.edu>
Date2014-09-17 18:56 -0400
Message-ID<mailman.14090.1410994642.18130.python-list@python.org>
In reply to#77973
On 9/17/2014 11:55 AM, Seymore4Head wrote:
> On Wed, 17 Sep 2014 04:02:16 -0400, Terry Reedy <tjreedy@udel.edu>
> wrote:
>> On 9/16/2014 10:17 PM, Seymore4Head wrote:
>>> What I do is click on the IDLE window and without making any changes I
>>> just hit f5 to rerun the program.
>>> Sometimes I get the error "the python shell window is already
>>> executing a command" and sometimes not.

You left out an important part of the error message ""please wait until 
it is finished."

>>> I am using XP and Python 3.4.1.

I am using 3.4.1 on Win 7.

>>> Is there a way to rerun a program without getting this error?

Follow the instruction you were given, but omitted, or see below.

>> Normally, hitting f5 kills the previous process if it is still running
>> and starts the one in the editor.  Please post a minimal program that
>> exhibits the problem.
>
> It happens in almost every program I have written.  I just tried this
> one again.  I could run the program by pushing f5.  The first couple
> of times it would run again by switching back to IDLE and pressing f5,
> but after the second or third time, it gives an error that the python
> shell window is already executing a command.
>
> If I make a change to the program, like adding or deleting a 0 from
> "rounds" the program will run without generating an error, but if I
> try to re run the program without changing anything, I get the error
> almost every time.
>
>
> Here is one.
>
> import random
> count =0
> rounds=1000
> heads=0
> tails=0
> ht=[0,1]
> while count<rounds:
>      coin=random.choice(ht)
>      if coin == 0:
>          heads=heads+1
>      elif coin == 1:
>          tails=tails+1
>      count = count + 1
> print (heads,tails)
> print ('Heads {:.2%} Tails "{:.2%} "'.format(heads/rounds,
> tails/rounds))

I am unable to reproduce the problem. When I run this program from an 
Idle editor, it finished before I can click on the Editor window and hit 
F5 again.  The same remains true with 1 or 2 zeros added.  With 1000000 
rounds, I get the expected behavior, which is no ouput from the 
cancelled process and a clean restart.

A little digging with Idle's grep (Find in Files) shows that the message 
is produced by this code in idlelib/PyShell.py, about 825.

     def display_executing_dialog(self):
         tkMessageBox.showerror(
             "Already executing",
             "The Python Shell window is already executing a command; "
             "please wait until it is finished.",
             master=self.tkconsole.text)

This function is only called here (about line 735)
     def runcommand(self, code):
         "Run the code without invoking the debugger"
         # The code better not raise an exception!
         if self.tkconsole.executing:
             self.display_executing_dialog()
         <else run idle code in user process output view user>

How is this run?  Run-Module F5 invokes 
ScriptBinding.run_module_event(116) and thence _run_module_event (129). 
This methods includes this.
         if PyShell.use_subprocess:
             interp.restart_subprocess(with_cwd=False)

restart_subprocess includes these lines (starting at 470):
         # Kill subprocess, spawn a new one, accept connection.
         self.rpcclt.close()
         self.terminate_subprocess()
         console = self.tkconsole
         ...
         console.executing = False  # == self.tkconsole
         ...
         self.transfer_path(with_cwd=with_cwd)

transfer_path calls runcommand but only after tkconsole.executing has 
been set to False.  But this only happens if PyShell.use_subprocess is 
True, which it normally is, but not if one starts Idle with the -n option.

After conditionally calling interp.restart_subprocess, _run_module_event 
directly calls interp.runcommand, which can fail when running with -n. 
Are you?  This is the only way I know to get the error message.  Is so, 
the second way to not get the error message is to not use -n and run 
normally.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#77992

FromSeymore4Head <Seymore4Head@Hotmail.invalid>
Date2014-09-17 21:34 -0400
Message-ID<5gdk1appae03ngjlot2hg574udmnc0iqg9@4ax.com>
In reply to#77985
On Wed, 17 Sep 2014 18:56:47 -0400, Terry Reedy <tjreedy@udel.edu>
wrote:

>On 9/17/2014 11:55 AM, Seymore4Head wrote:
>> On Wed, 17 Sep 2014 04:02:16 -0400, Terry Reedy <tjreedy@udel.edu>
>> wrote:
>>> On 9/16/2014 10:17 PM, Seymore4Head wrote:
>>>> What I do is click on the IDLE window and without making any changes I
>>>> just hit f5 to rerun the program.
>>>> Sometimes I get the error "the python shell window is already
>>>> executing a command" and sometimes not.
>
>You left out an important part of the error message ""please wait until 
>it is finished."
>
>>>> I am using XP and Python 3.4.1.
>
>I am using 3.4.1 on Win 7.
>
>>>> Is there a way to rerun a program without getting this error?
>
>Follow the instruction you were given, but omitted, or see below.
>
>>> Normally, hitting f5 kills the previous process if it is still running
>>> and starts the one in the editor.  Please post a minimal program that
>>> exhibits the problem.
>>
>> It happens in almost every program I have written.  I just tried this
>> one again.  I could run the program by pushing f5.  The first couple
>> of times it would run again by switching back to IDLE and pressing f5,
>> but after the second or third time, it gives an error that the python
>> shell window is already executing a command.
>>
>> If I make a change to the program, like adding or deleting a 0 from
>> "rounds" the program will run without generating an error, but if I
>> try to re run the program without changing anything, I get the error
>> almost every time.
>>
>>
>> Here is one.
>>
>> import random
>> count =0
>> rounds=1000
>> heads=0
>> tails=0
>> ht=[0,1]
>> while count<rounds:
>>      coin=random.choice(ht)
>>      if coin == 0:
>>          heads=heads+1
>>      elif coin == 1:
>>          tails=tails+1
>>      count = count + 1
>> print (heads,tails)
>> print ('Heads {:.2%} Tails "{:.2%} "'.format(heads/rounds,
>> tails/rounds))
>
>I am unable to reproduce the problem. When I run this program from an 
>Idle editor, it finished before I can click on the Editor window and hit 
>F5 again.  The same remains true with 1 or 2 zeros added.  With 1000000 
>rounds, I get the expected behavior, which is no ouput from the 
>cancelled process and a clean restart.
>
>A little digging with Idle's grep (Find in Files) shows that the message 
>is produced by this code in idlelib/PyShell.py, about 825.
>
>     def display_executing_dialog(self):
>         tkMessageBox.showerror(
>             "Already executing",
>             "The Python Shell window is already executing a command; "
>             "please wait until it is finished.",
>             master=self.tkconsole.text)
>
>This function is only called here (about line 735)
>     def runcommand(self, code):
>         "Run the code without invoking the debugger"
>         # The code better not raise an exception!
>         if self.tkconsole.executing:
>             self.display_executing_dialog()
>         <else run idle code in user process output view user>
>
>How is this run?  Run-Module F5 invokes 
>ScriptBinding.run_module_event(116) and thence _run_module_event (129). 
>This methods includes this.
>         if PyShell.use_subprocess:
>             interp.restart_subprocess(with_cwd=False)
>
>restart_subprocess includes these lines (starting at 470):
>         # Kill subprocess, spawn a new one, accept connection.
>         self.rpcclt.close()
>         self.terminate_subprocess()
>         console = self.tkconsole
>         ...
>         console.executing = False  # == self.tkconsole
>         ...
>         self.transfer_path(with_cwd=with_cwd)
>
>transfer_path calls runcommand but only after tkconsole.executing has 
>been set to False.  But this only happens if PyShell.use_subprocess is 
>True, which it normally is, but not if one starts Idle with the -n option.
>
>After conditionally calling interp.restart_subprocess, _run_module_event 
>directly calls interp.runcommand, which can fail when running with -n. 
>Are you?  This is the only way I know to get the error message.  Is so, 
>the second way to not get the error message is to not use -n and run 
>normally.

Sorry.  I don't speak python yet.  Quite a few of the above terms are
new to me.

It may be that was trying to run the program again before the current
one was finished.  In the past I was getting the error when I was
(almost) sure the program had finished.  I will be more careful in the
future, but I will also keep an eye out for the problem to repeat.
I just tried to run the above program again and gave it more time to
finish and I did not get the error, so it could well be I was jumping
the gun.

Thanks

[toc] | [prev] | [next] | [standalone]


#77997

FromTerry Reedy <tjreedy@udel.edu>
Date2014-09-17 23:50 -0400
Message-ID<mailman.14096.1411012292.18130.python-list@python.org>
In reply to#77992
On 9/17/2014 9:34 PM, Seymore4Head wrote:
> On Wed, 17 Sep 2014 18:56:47 -0400, Terry Reedy <tjreedy@udel.edu>

>> A little digging with Idle's grep (Find in Files) shows that the message
>> is produced by this code in idlelib/PyShell.py, about 825.
>>
>>      def display_executing_dialog(self):
>>          tkMessageBox.showerror(
>>              "Already executing",
>>              "The Python Shell window is already executing a command; "
>>              "please wait until it is finished.",
>>              master=self.tkconsole.text)
>>
>> This function is only called here (about line 735)
>>      def runcommand(self, code):
>>          "Run the code without invoking the debugger"
>>          # The code better not raise an exception!
>>          if self.tkconsole.executing:
>>              self.display_executing_dialog()
>>          <else run idle code in user process output view user>
>>
>> How is this run?  Run-Module F5 invokes
>> ScriptBinding.run_module_event(116) and thence _run_module_event (129).
>> This methods includes this.
>>          if PyShell.use_subprocess:
>>              interp.restart_subprocess(with_cwd=False)
>>
>> restart_subprocess includes these lines (starting at 470):
>>          # Kill subprocess, spawn a new one, accept connection.
>>          self.rpcclt.close()
>>          self.terminate_subprocess()
>>          console = self.tkconsole
>>          ...
>>          console.executing = False  # == self.tkconsole
>>          ...
>>          self.transfer_path(with_cwd=with_cwd)
>>
>> transfer_path calls runcommand but only after tkconsole.executing has
>> been set to False.  But this only happens if PyShell.use_subprocess is
>> True, which it normally is, but not if one starts Idle with the -n option.
>>
>> After conditionally calling interp.restart_subprocess, _run_module_event
>> directly calls interp.runcommand, which can fail when running with -n.
>> Are you?  This is the only way I know to get the error message.  Is so,
>> the second way to not get the error message is to not use -n and run
>> normally.
>
> Sorry.  I don't speak python yet.  Quite a few of the above terms are
> new to me.
>
> It may be that was trying to run the program again before the current
> one was finished.  In the past I was getting the error when I was
> (almost) sure the program had finished.  I will be more careful in the
> future, but I will also keep an eye out for the problem to repeat.
> I just tried to run the above program again and gave it more time to
> finish and I did not get the error, so it could well be I was jumping
> the gun.

My question was "How do you start Idle?"
(I can make a difference.)

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#78019

FromSeymore4Head <Seymore4Head@Hotmail.invalid>
Date2014-09-18 11:24 -0400
Message-ID<22ul1a9bfsehco2kk5jb0uif8mpm33ue37@4ax.com>
In reply to#77997
On Wed, 17 Sep 2014 23:50:56 -0400, Terry Reedy <tjreedy@udel.edu>
wrote:

>On 9/17/2014 9:34 PM, Seymore4Head wrote:
>> On Wed, 17 Sep 2014 18:56:47 -0400, Terry Reedy <tjreedy@udel.edu>
>
>>> A little digging with Idle's grep (Find in Files) shows that the message
>>> is produced by this code in idlelib/PyShell.py, about 825.
>>>
>>>      def display_executing_dialog(self):
>>>          tkMessageBox.showerror(
>>>              "Already executing",
>>>              "The Python Shell window is already executing a command; "
>>>              "please wait until it is finished.",
>>>              master=self.tkconsole.text)
>>>
>>> This function is only called here (about line 735)
>>>      def runcommand(self, code):
>>>          "Run the code without invoking the debugger"
>>>          # The code better not raise an exception!
>>>          if self.tkconsole.executing:
>>>              self.display_executing_dialog()
>>>          <else run idle code in user process output view user>
>>>
>>> How is this run?  Run-Module F5 invokes
>>> ScriptBinding.run_module_event(116) and thence _run_module_event (129).
>>> This methods includes this.
>>>          if PyShell.use_subprocess:
>>>              interp.restart_subprocess(with_cwd=False)
>>>
>>> restart_subprocess includes these lines (starting at 470):
>>>          # Kill subprocess, spawn a new one, accept connection.
>>>          self.rpcclt.close()
>>>          self.terminate_subprocess()
>>>          console = self.tkconsole
>>>          ...
>>>          console.executing = False  # == self.tkconsole
>>>          ...
>>>          self.transfer_path(with_cwd=with_cwd)
>>>
>>> transfer_path calls runcommand but only after tkconsole.executing has
>>> been set to False.  But this only happens if PyShell.use_subprocess is
>>> True, which it normally is, but not if one starts Idle with the -n option.
>>>
>>> After conditionally calling interp.restart_subprocess, _run_module_event
>>> directly calls interp.runcommand, which can fail when running with -n.
>>> Are you?  This is the only way I know to get the error message.  Is so,
>>> the second way to not get the error message is to not use -n and run
>>> normally.
>>
>> Sorry.  I don't speak python yet.  Quite a few of the above terms are
>> new to me.
>>
>> It may be that was trying to run the program again before the current
>> one was finished.  In the past I was getting the error when I was
>> (almost) sure the program had finished.  I will be more careful in the
>> future, but I will also keep an eye out for the problem to repeat.
>> I just tried to run the above program again and gave it more time to
>> finish and I did not get the error, so it could well be I was jumping
>> the gun.
>
>My question was "How do you start Idle?"
>(I can make a difference.)

The way I start IDLE is to go to my programs folder and right click on
file.py in the directory and select "edit with IDLE".

[toc] | [prev] | [next] | [standalone]


#78036

FromTerry Reedy <tjreedy@udel.edu>
Date2014-09-18 15:05 -0400
Message-ID<mailman.14118.1411067191.18130.python-list@python.org>
In reply to#78019
On 9/18/2014 11:24 AM, Seymore4Head wrote:
> On Wed, 17 Sep 2014 23:50:56 -0400, Terry Reedy <tjreedy@udel.edu>
> wrote:

>> My question was "How do you start Idle?"
>> (I can make a difference.)
>
> The way I start IDLE is to go to my programs folder and right click on
> file.py in the directory and select "edit with IDLE".

A couple more questions; after you run the file once, is there a warning 
above the first >>> prompt?  If, after the program stop and you see a 
second >>> prompt and run
 >>> import sys; len(sys.modules), 'array' in sys.modules
what is the result?

If you run the program multiple times and get the error message, please 
cut and paste the whole message and the lines above, up to 10 or 15.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#78041

FromSeymore4Head <Seymore4Head@Hotmail.invalid>
Date2014-09-18 15:58 -0400
Message-ID<m3em1ah259d78e83f64drkjqbt4i2v66lv@4ax.com>
In reply to#78036
On Thu, 18 Sep 2014 15:05:53 -0400, Terry Reedy <tjreedy@udel.edu>
wrote:

>On 9/18/2014 11:24 AM, Seymore4Head wrote:
>> On Wed, 17 Sep 2014 23:50:56 -0400, Terry Reedy <tjreedy@udel.edu>
>> wrote:
>
>>> My question was "How do you start Idle?"
>>> (I can make a difference.)
>>
>> The way I start IDLE is to go to my programs folder and right click on
>> file.py in the directory and select "edit with IDLE".
>
>A couple more questions; after you run the file once, is there a warning 
>above the first >>> prompt?  If, after the program stop and you see a 
>second >>> prompt and run
> >>> import sys; len(sys.modules), 'array' in sys.modules
>what is the result?
>
>If you run the program multiple times and get the error message, please 
>cut and paste the whole message and the lines above, up to 10 or 15.

I think it might be that I was trying to re run the program too soon.
I haven't messed with any programming too much, but I did re run the
program I posted and gave it more time to finish.  That seems to have
been the problem.

If I run into the problem again after making sure the program has
finished, I will update.

Thanks

[toc] | [prev] | [next] | [standalone]


#78055

FromChris Angelico <rosuav@gmail.com>
Date2014-09-19 12:51 +1000
Message-ID<mailman.14133.1411095115.18130.python-list@python.org>
In reply to#78019
On Fri, Sep 19, 2014 at 5:05 AM, Terry Reedy <tjreedy@udel.edu> wrote:
> A couple more questions; after you run the file once, is there a warning
> above the first >>> prompt?  If, after the program stop and you see a second
>>>> prompt and run
>>>> import sys; len(sys.modules), 'array' in sys.modules
> what is the result?

What's significant about the array module here? I'm a little puzzled.

ChrisA

[toc] | [prev] | [next] | [standalone]


#78086

FromTerry Reedy <tjreedy@udel.edu>
Date2014-09-19 15:43 -0400
Message-ID<mailman.14152.1411155853.18130.python-list@python.org>
In reply to#78019
On 9/18/2014 10:51 PM, Chris Angelico wrote:
> On Fri, Sep 19, 2014 at 5:05 AM, Terry Reedy <tjreedy@udel.edu> wrote:
>> A couple more questions; after you run the file once, is there a warning
>> above the first >>> prompt?  If, after the program stop and you see a second
>>>>> prompt and run
>>>>> import sys; len(sys.modules), 'array' in sys.modules
>> what is the result?
>
> What's significant about the array module here? I'm a little puzzled.

'array' is alphabetically the first module imported in the default 
two-process mode but not in the one-process mode selected by a command 
line '-n'.  To the best of my understanding, the message reported, which 
I found in the code, should only appear in one-process mode.

Seymour reported that he started Idle by right-clicking on the file and 
selecting 'Edit with Idle'. Asking the above question is easier then 
trying to get him to directly determine what command line is associated 
with 'Edit with Idle' on his particular machine.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#78087

FromChris Angelico <rosuav@gmail.com>
Date2014-09-20 05:47 +1000
Message-ID<mailman.14153.1411156063.18130.python-list@python.org>
In reply to#78019
On Sat, Sep 20, 2014 at 5:43 AM, Terry Reedy <tjreedy@udel.edu> wrote:
> On 9/18/2014 10:51 PM, Chris Angelico wrote:
>>
>> On Fri, Sep 19, 2014 at 5:05 AM, Terry Reedy <tjreedy@udel.edu> wrote:
>>>
>>> A couple more questions; after you run the file once, is there a warning
>>> above the first >>> prompt?  If, after the program stop and you see a
>>> second
>>>>>>
>>>>>> prompt and run
>>>>>> import sys; len(sys.modules), 'array' in sys.modules
>>>
>>> what is the result?
>>
>>
>> What's significant about the array module here? I'm a little puzzled.
>
>
> 'array' is alphabetically the first module imported in the default
> two-process mode but not in the one-process mode selected by a command line
> '-n'.  To the best of my understanding, the message reported, which I found
> in the code, should only appear in one-process mode.
>
> Seymour reported that he started Idle by right-clicking on the file and
> selecting 'Edit with Idle'. Asking the above question is easier then trying
> to get him to directly determine what command line is associated with 'Edit
> with Idle' on his particular machine.

Ah! Nice one. :) Get the info you want with a very simple copy/paste
line of code. Cryptic, but effective.

ChrisA

[toc] | [prev] | [next] | [standalone]


#78026

FromTony the Tiger <tony@tiger.invalid>
Date2014-09-18 16:50 +0000
Message-ID<541b0d70$0$1570$c3e8da3$e408f015@news.astraweb.com>
In reply to#77951
On Tue, 16 Sep 2014 22:17:44 -0400, Seymore4Head wrote:

> Is there a way to rerun a program without getting this error?

No idea. But what happens if you don't use IDLE, but a DOS box?

Up-arrow then Enter to re-run, ain't rocket science. Almost as simple as 
F5, which IMO is awkwardly situated on the keyboard.

If you use IDLE as an IDE, I pity you. There are heaps of better IDEs out 
there, free and open source. My fav (so far) is the eclipse-PyDev 
combination, and sometimes Geany for those simple tasks of just testing 
stuff without having to create a full-blown project.

Geany, BTW, on GNU/Linux has a terminal window built in. Not on win, that 
I've noticed. Pity, it's good to have it around.

Heck, even Notepad++ is better than IDLE, IMO.

But, as they say, each to his or her own.


 /Grrr
-- 
          ___                  ___
 (\_--_/)  | _ ._    _|_|_  _   |o _  _ ._
 ( 9  9 )  |(_)| |\/  |_| |(/_  ||(_|(/_|
 stripes are forever - as overripe ferrets

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web