Re: how to run shell command like "<

2012-10-07 Thread 叶佑群
于 2012-9-29 19:53, Kushal Kumaran 写道: On Sat, Sep 29, 2012 at 6:18 AM, 叶佑群 wrote: 于 2012-9-28 16:16, Kushal Kumaran 写道: On Fri, Sep 28, 2012 at 1:15 PM, 叶佑群 wrote: Hi, all, I have the shell command like this: sfdisk -uM /dev/sdb<< EOT ,1000,83 ,,83 EOT I have tried subpro

Re: how to run shell command like "<

2012-09-29 Thread Kushal Kumaran
On Sat, Sep 29, 2012 at 6:18 AM, 叶佑群 wrote: > 于 2012-9-28 16:16, Kushal Kumaran 写道: >> >> On Fri, Sep 28, 2012 at 1:15 PM, 叶佑群 wrote: >> >>> Hi, all, >>> >>> I have the shell command like this: >>> >>> sfdisk -uM /dev/sdb<< EOT >>> ,1000,83 >>> ,,83 >>> EOT >>> >>> >>> I have tried sub

Re: how to run shell command like "<

2012-09-28 Thread 叶佑群
于 2012-9-28 16:16, Kushal Kumaran 写道: On Fri, Sep 28, 2012 at 1:15 PM, 叶佑群 wrote: Hi, all, I have the shell command like this: sfdisk -uM /dev/sdb<< EOT ,1000,83 ,,83 EOT I have tried subprocess.Popen, pexpect.spawn and os.popen, but none of these works, but when I type this shel

Re: how to run shell command like "<

2012-09-28 Thread 叶佑群
于 2012-9-28 16:16, Kushal Kumaran 写道: On Fri, Sep 28, 2012 at 1:15 PM, 叶佑群 wrote: Hi, all, I have the shell command like this: sfdisk -uM /dev/sdb<< EOT ,1000,83 ,,83 EOT I have tried subprocess.Popen, pexpect.spawn and os.popen, but none of these works, but when I type this shel

Re: how to run shell command like "<

2012-09-28 Thread Kushal Kumaran
On Fri, Sep 28, 2012 at 1:15 PM, 叶佑群 wrote: > Hi, all, > > I have the shell command like this: > > sfdisk -uM /dev/sdb << EOT > ,1000,83 > ,,83 > EOT > > > I have tried subprocess.Popen, pexpect.spawn and os.popen, but none of > these works, but when I type this shell command in shell, it

how to run shell command like "<

2012-09-28 Thread 叶佑群
Hi, all, I have the shell command like this: sfdisk -uM /dev/sdb << EOT ,1000,83 ,,83 EOT I have tried subprocess.Popen, pexpect.spawn and os.popen, but none of these works, but when I type this shell command in shell, it is works fine. I wonder how to emulate this type o