On Fri, May 15, 2009 at 12:46 PM, Noufal Ibrahim 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 "ThisIsMyUrl"
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 t
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 > IAmAnEmptyFileWith
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 > IAmAnEmptyFileWith
2009/5/15 MK :
> 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 > IAmAnE
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
http://m
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"
u
Forwarding to list because of mail delivery error...
2009/5/15 Sander Sweers :
> 2009/5/14 MK :
>> 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 *stdin* and pipes it to
> T
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()
> con
import commands
On Thu, May 14, 2009 at 4:28 PM, vince spicer wrote:
> 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 wrote:
>
>> Hi there,
>>
>> i am using this code to send an "cat > Th
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 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 comm
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()
ret
12 matches
Mail list logo