Re: the python shell window is already executing a command

2014-09-19 Thread Chris Angelico
On Sat, Sep 20, 2014 at 5:43 AM, Terry Reedy wrote: > On 9/18/2014 10:51 PM, Chris Angelico wrote: >> >> On Fri, Sep 19, 2014 at 5:05 AM, Terry Reedy wrote: >>> >>> A couple more questions; after you run the file once, is there a warning >>> above the first >>> prompt? If, after the program stop

Re: the python shell window is already executing a command

2014-09-19 Thread Terry Reedy
On 9/18/2014 10:51 PM, Chris Angelico wrote: On Fri, Sep 19, 2014 at 5:05 AM, Terry Reedy 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), 'a

Re: the python shell window is already executing a command

2014-09-18 Thread Chris Angelico
On Fri, Sep 19, 2014 at 5:05 AM, Terry Reedy 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

Re: the python shell window is already executing a command

2014-09-18 Thread Seymore4Head
On Thu, 18 Sep 2014 15:05:53 -0400, Terry Reedy wrote: >On 9/18/2014 11:24 AM, Seymore4Head wrote: >> On Wed, 17 Sep 2014 23:50:56 -0400, Terry Reedy >> 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

Re: the python shell window is already executing a command

2014-09-18 Thread Terry Reedy
On 9/18/2014 11:24 AM, Seymore4Head wrote: On Wed, 17 Sep 2014 23:50:56 -0400, Terry Reedy 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".

Re: the python shell window is already executing a command

2014-09-18 Thread Seymore4Head
de in idlelib/PyShell.py, about 825. >>> >>> def display_executing_dialog(self): >>> tkMessageBox.showerror( >>> "Already executing", >>> "The Python Shell window is already executing a command; &quo

Re: the python shell window is already executing a command

2014-09-17 Thread Terry Reedy
(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 ru

Re: the python shell window is already executing a command

2014-09-17 Thread Seymore4Head
thout 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

Re: the python shell window is already executing a command

2014-09-17 Thread Terry Reedy
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?

Re: the python shell window is already executing a command

2014-09-17 Thread Seymore4Head
o 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.

Re: the python shell window is already executing a command

2014-09-17 Thread Terry Reedy
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 proces

the python shell window is already executing a command

2014-09-16 Thread Seymore4Head
indow 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? -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem with pexpect when executing a command on a remote machine

2014-08-27 Thread Chris Angelico
On Thu, Aug 28, 2014 at 1:27 AM, Kiran kumar Venkumahanti wrote: > ''Error sending command: cluster config -r -a Timeout exceeded in > read_nonblocking().\n\nversion: 2.4 > ($Revision: 516 $)\ncommand: /usr/bin/ssh\nargs: [\'/usr/bin/ssh\', \'-o\', > \'ServerAliveInterval=60\', \'-o\', \'UserKnown

Problem with pexpect when executing a command on a remote machine

2014-08-27 Thread Kiran kumar Venkumahanti
Hi, I am trying to execute a command on a remote machine for which I am using Python pexpect module. Iam able to connect and copy files to the remote machine but getting the following error when trying to execute commands on the remote machine. Please find the below error. ''Error sending comman

Re: Executing a command from within python using the subprocess module

2010-02-18 Thread Aahz
In article <5yudnafyso8houtwnz2dnuvz_tidn...@westnet.com.au>, R (Chandra) Chandrasekhar wrote: > >--- >import subprocess > >width = 5 >height = 30 >colors = ['#abcdef]', '#456789'] >filename = "/tmp/image.png" > ># I want to get the equivalent of variable interpolation in Perl ># so that the comma

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread Nobody
On Tue, 16 Feb 2010 00:11:36 +0800, R (Chandra) Chandrasekhar wrote: > One other question I forgot to ask is this why is there a terminal > backslash in > >> subprocess.call("""\ > > Removing the backslash makes the function fail. > > I wonder why, because """ is supposed to allow multi-line s

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread Peter Otten
R (Chandra) Chandrasekhar wrote: > Peter Otten wrote: > >> import subprocess >> >> def convert(width=5, height=30, colors=['#abcdef', '#456789'], >> filename="tmp/image with space in its name.png"): >> lookup = locals() >> assert all("\n" not in str(s) for s in lookup.values(

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread R (Chandra) Chandrasekhar
Alf P. Steinbach wrote: * R (Chandra) Chandrasekhar: width = 5 height = 30 colors = ['#abcdef]', '#456789'] filename = "/tmp/image.png" # I want to get the equivalent of variable interpolation in Perl # so that the command # # convert -size 5x30 gradient:#abcdef-#456789 /tmp/image.png # # is d

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread Steve Holden
R (Chandra) Chandrasekhar wrote: > Peter Otten wrote: >> import subprocess >> >> def convert(width=5, height=30, colors=['#abcdef', '#456789'], >> filename="tmp/image with space in its name.png"): >> lookup = locals() >> assert all("\n" not in str(s) for s in lookup.values()) >>

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread R (Chandra) Chandrasekhar
Peter Otten wrote: import subprocess def convert(width=5, height=30, colors=['#abcdef', '#456789'], filename="tmp/image with space in its name.png"): lookup = locals() assert all("\n" not in str(s) for s in lookup.values()) subprocess.call("""\ convert -size {width}x{heig

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread John Posner
On 2/15/2010 7:35 AM, R (Chandra) Chandrasekhar wrote: Dear Folks, I want to execute a command from within python using the subprocess module. Coming from a Perl background, I thought I could use variable interpolation in strings, but found that this is neither supported Yes, it is: see the u

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread R (Chandra) Chandrasekhar
Peter Otten wrote: import subprocess def convert(width=5, height=30, colors=['#abcdef', '#456789'], filename="tmp/image with space in its name.png"): lookup = locals() assert all("\n" not in str(s) for s in lookup.values()) subprocess.call("""\ convert -size {width}x{hei

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread Peter Otten
R (Chandra) Chandrasekhar wrote: > I want to execute a command from within python using the subprocess > module. > > Coming from a Perl background, I thought I could use variable > interpolation in strings, but found that this is neither supported nor > the Python way. Accordingly, I am a little

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread Alf P. Steinbach
* R (Chandra) Chandrasekhar: width = 5 height = 30 colors = ['#abcdef]', '#456789'] filename = "/tmp/image.png" # I want to get the equivalent of variable interpolation in Perl # so that the command # # convert -size 5x30 gradient:#abcdef-#456789 /tmp/image.png # # is derived from the variables

Executing a command from within python using the subprocess module

2010-02-15 Thread R (Chandra) Chandrasekhar
Dear Folks, I want to execute a command from within python using the subprocess module. Coming from a Perl background, I thought I could use variable interpolation in strings, but found that this is neither supported nor the Python way. Accordingly, I am a little at sea about how to accomplis

Re: Is there a way of executing a command in a string?

2005-08-10 Thread Mike Meyer
Jeff Schwab <[EMAIL PROTECTED]> writes: > Jerry He wrote: >> Hi, suppose I have the following string >> cmdstr = "b = lambda s: s*s" >> Is there a way to execute this string other than >> copying it onto a file and then importing it? > > >>> exec "b = lambda s: s*s" > >>> b Jeff forgot to w

Re: Is there a way of executing a command in a string?

2005-08-09 Thread Jeff Schwab
Jerry He wrote: > Hi, > suppose I have the following string > > cmdstr = "b = lambda s: s*s" > > Is there a way to execute this string other than > copying it onto a file and then importing it? >>> exec "b = lambda s: s*s" >>> b at 0x4d69cc> -- http://mail.python.org/mailman/listinfo/p

Is there a way of executing a command in a string?

2005-08-09 Thread Jerry He
Hi, suppose I have the following string cmdstr = "b = lambda s: s*s" Is there a way to execute this string other than copying it onto a file and then importing it? thanks in advance, Jerry __ Do You Yahoo!? Tired of spam? Yahoo! Mail has

Re: executing a command

2005-06-05 Thread andrea valle
Thanks, I solved it. The problem depended on IDLE. If I invoke a file from command line with os.exec* everything works perfectly.- Best -a- On 5 Jun 2005, at 01:07, Tiago Stürmer Daitx wrote: > Hello, > > When you use one of the os.exec*p functions python looks for the > specified file in the

Re: executing a command

2005-06-04 Thread =?ISO-8859-1?Q?Tiago_St=FCrmer_Daitx?=
Hello,When you use one of the os.exec*p fnnctions python looks for the specified file in the directories refered by os.environ['PATH']. If and _only_ if your os.enviroment['PATH'] isn't set then it looks in os.defpath - you can check this at http://www.python.org/doc/current/lib/os-path.html#l2h-15

executing a command

2005-06-04 Thread andrea valle
Hi to all, I need to run a program from inside python (substantially, algorithmic batch processing). I'm on mac osx 10.3.8 with python 2.3 framework and macpython. Trying to use exec*, I checked references, Brueck & Tanner, and then grab this code from effbot: >>> program = "python" >>> de