What is this line supposedto do?
cmd.run('www.python.org')
Christopher Arndt wrote:
Alan Gauld schrieb:
Thanks, I may use that as one of the example programs if
you don't mind?
I took the liberty of refactoring Johan's example a bit, to make it more
reusable. See
Johan Geldenhuys wrote:
What is this line supposedto do?
cmd.run('www.python.org')
Run the command that was defined at object creation ('ping -c 10') with
the argument 'www.python.org'.
Chris
___
Tutor maillist - Tutor@python.org
This script was not intended to be used from the command line, but to
be called from elsewhere. It was only a test piece of code.
If you use the ping command with the args that you are calling it with,
there is no need to kill the process, it will terminate after 10
requests. 8-)
Johan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Johan Geldenhuys schrieb:
This script was not intended to be used from the command line, but to
be called from elsewhere. It was only a test piece of code.
If you use the ping command with the args that you are calling it with,
there is no need
Alan,
You may remember that I asked questions on killing a process, a while back,
Sice this is relatedto the tutorial that yu are writing, this was the
best solution that worked for me to killa process for a command that
keeps on running like eg. 'tcpdump'.
HTH
Johan
BTW, There will a be
Thanks, I may use that as one of the example programs if
you don't mind?
Alan G.
- Original Message -
From: Johan Geldenhuys [EMAIL PROTECTED]
To: Alan Gauld [EMAIL PROTECTED]
Cc: Python Tutor list tutor@python.org
Sent: Wednesday, November 16, 2005 8:12 AM
Subject: Re: [Tutor] new
Alan Gauld schrieb:
Thanks, I may use that as one of the example programs if
you don't mind?
I took the liberty of refactoring Johan's example a bit, to make it more
reusable. See attached file.
Chris
Wrapper object for external commands, that allows to kill them after later..
::Author:
Alan Gauld schrieb:
I've just added an incomplete draft copy of my latest tutorial topic
on using the Operating System from Python. The material that's
there discusses the role of the OS and looks at file handling
usng os/os.path/shutil etc.
I've just added an incomplete draft copy of my latest tutorial topic
on using the Operating System from Python. The material that's
there discusses the role of the OS and looks at file handling
usng os/os.path/shutil etc.
http://www.freenetpages.co.uk/hp/alan.gauld/tutos.htm
If anyone would
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Alan Gauld
I've just added an incomplete draft copy of my latest tutorial topic
on using the Operating System from Python. The material that's
there discusses the role of the OS and looks at file
10 matches
Mail list logo