On Fri, May 15, 2009 at 12:46 PM, Noufal Ibrahim nou...@nibrahim.net.in wrote:
MK wrote:
Hi there,
i am using this code to send an cat ThisIsMyUrl with popen.
Of cos cat now waits for the CTRL+D command. How can i send this command ?
Wouldn't it be better if you directly opened the
Ok. I explain it once more. Its not about reading the console output of
the command. Its that i want to put a empty file in my subdirectories
so that the name of the file is a message or url or something else.
And if you want an empty file you can do that with
cat IAmAnEmptyFileWithOnlyAName
Seems that i did it the wrong way still from the beginning.
I did it now with open and write an empty file.
But anyway i would wish to know if it is possible to terminate
a running cat.
Thank you all.
___
Tutor maillist - Tutor@python.org
2009/5/15 MK lop...@gmx.net:
Ok. I explain it once more. Its not about reading the console output of
the command. Its that i want to put a empty file in my subdirectories
so that the name of the file is a message or url or something else.
And if you want an empty file you can do that with
cat
MK wrote:
Ok. I explain it once more. Its not about reading the console output of
the command. Its that i want to put a empty file in my subdirectories
so that the name of the file is a message or url or something else.
And if you want an empty file you can do that with
cat
MK wrote:
Ok. I explain it once more. Its not about reading the console output of
the command. Its that i want to put a empty file in my subdirectories
so that the name of the file is a message or url or something else.
And if you want an empty file you can do that with
cat
MK wrote:
Hi there,
i am using this code to send an cat ThisIsMyUrl with popen.
Of cos cat now waits for the CTRL+D command.
How can i send this command ?
Wouldn't it be better if you directly opened the ThisIsMyUrl file and
wrote the text into it rather than rely on shelling out for this?
Hi there,
i am using this code to send an cat ThisIsMyUrl with popen.
Of cos cat now waits for the CTRL+D command.
How can i send this command ?
def console_command(cmd):
print cmd
console = os.popen(cmd,r)
output = console.read()
console.close()
return
Take a peak at commands.getoutput
EX:
import commmands
ls = commands.getoutput(ls- ls)
Vince
On Thu, May 14, 2009 at 3:50 PM, MK lop...@gmx.net wrote:
Hi there,
i am using this code to send an cat ThisIsMyUrl with popen.
Of cos cat now waits for the CTRL+D command.
How can i send this
MK wrote:
Hi there,
i am using this code to send an cat ThisIsMyUrl with popen.
Of cos cat now waits for the CTRL+D command.
How can i send this command ?
def console_command(cmd):
print cmd
console = os.popen(cmd,r)
output = console.read()
console.close()
Forwarding to list because of mail delivery error...
2009/5/15 Sander Sweers sander.swe...@gmail.com:
2009/5/14 MK lop...@gmx.net:
i am using this code to send an cat ThisIsMyUrl with popen.
First, I am not sure if you understand what cat ThisIsMyUrl
actually does... It waits for data on
11 matches
Mail list logo