Question About Command line arguments

Dennis daodennis at gmail.com
Fri Jun 10 14:05:11 EDT 2011


On Fri, Jun 10, 2011 at 11:03 AM, Dennis <daodennis at gmail.com> wrote:
> On Fri, Jun 10, 2011 at 10:58 AM, Mark Phillips
> <mark at phillipsmarketing.biz> wrote:
>> On Fri, Jun 10, 2011 at 10:41 AM, MRAB <python at mrabarnett.plus.com> wrote:
>>
>> On 10/06/2011 18:21, Mark Phillips wrote:
>
>>
> How do I write my script so it picks up argument from the output of commands
> that pipe input into my script?

I think if you want to replicate stdin behaviour try looking into
the xargs command, assuming that is available on your platform.

However reading in stdin into argv may be more elegant, but slightly
unexpected to the experienced user.

Dennis O.



More information about the Python-list mailing list