"Randy Kao" wrote
In trying to do this in Python, I think I've read a couple ways to
do this.
through: os.popen, os.popen2, os.popen3, os.system,
commands.getoutput()
This is historically one of the things that Python has had trouble
with.
The things you list have all been introduced o
On Fri, Jun 25, 2010 at 8:43 PM, David Hutto wrote:
> On Fri, Jun 25, 2010 at 9:37 PM, Randy Kao wrote:
>> Thanks for the great and quick feedback from everyone!
>> That definitely clears things up.
>> -Randy
>
> And I was like...me too.
Just to clarify, it looks like subprocess is intended to r
On Fri, Jun 25, 2010 at 9:37 PM, Randy Kao wrote:
> Thanks for the great and quick feedback from everyone!
> That definitely clears things up.
> -Randy
> On Fri, Jun 25, 2010 at 5:16 PM, Steven D'Aprano
> wrote:
>>
>> On Sat, 26 Jun 2010 08:46:17 am Randy Kao wrote:
>> > Hi all,
>> >
>> > I'm a n
Thanks for the great and quick feedback from everyone!
That definitely clears things up.
-Randy
On Fri, Jun 25, 2010 at 5:16 PM, Steven D'Aprano wrote:
> On Sat, 26 Jun 2010 08:46:17 am Randy Kao wrote:
> > Hi all,
> >
> > I'm a newbie to Python (switching from Perl) and had a question about
>
On Fri, Jun 25, 2010 at 7:48 PM, David Hutto wrote:
> On Fri, Jun 25, 2010 at 8:16 PM, Steven D'Aprano wrote:
>> On Sat, 26 Jun 2010 08:46:17 am Randy Kao wrote:
>>> Hi all,
>>>
>>> I'm a newbie to Python (switching from Perl) and had a question about
>>> the best way to run external commands in
On Fri, Jun 25, 2010 at 8:16 PM, Steven D'Aprano wrote:
> On Sat, 26 Jun 2010 08:46:17 am Randy Kao wrote:
>> Hi all,
>>
>> I'm a newbie to Python (switching from Perl) and had a question about
>> the best way to run external commands in Python.
> [...]
>> through: os.popen, os.popen2, os.popen3,
On Sat, 26 Jun 2010 08:46:17 am Randy Kao wrote:
> Hi all,
>
> I'm a newbie to Python (switching from Perl) and had a question about
> the best way to run external commands in Python.
[...]
> through: os.popen, os.popen2, os.popen3, os.system,
> commands.getoutput()
os.system is the oldest way, a
Subprocess module is the preferred strategy when You want to communicate with
the command you're running. If not, you can use os.system.
Sent from my iPhone
On Jun 25, 2010, at 5:46 PM, Randy Kao wrote:
> Hi all,
>
> I'm a newbie to Python (switching from Perl) and had a question about the
>
Hi all,
I'm a newbie to Python (switching from Perl) and had a question about the
best way to run external commands in Python.
In doing some reading I'm confused about which is the best way to accomplish
this.
With Perl, the way I went about running commands was by opening a filehandle
and parsi