How can I do this with python ?
Philippe Martin
pmartin at snakecard.com
Mon May 8 10:21:04 EDT 2006
Xiao Jianfeng wrote:
> Tim N. van der Leeuw wrote:
>> Your question is insufficiently clear for me to answer.
>>
>> Do you want to know how to read from standard-input in a Python
>> program?
>>
>> Do you want to know how to start an external program from Python, and
>> then connect something to that programs standard input?
>>
>> Do you want to know something else?
>>
>> Please specify!
>>
>> Cheers,
>>
>> --Tim
>>
>>
> Thanks.
>
> For example, I can call vim and do something like this in a shell script,
>
> #!/bin/sh
>
> vim a.file<<-EOF
> :some_vim_command
> :some_vim_command
> :w
> :q
> EOF
>
> I want to know how to call vim and to the same thing with python.
>
> Regrads,
hi,
os.popen should do that.
Philippe
More information about the Python-list
mailing list