Re: Using sh library with grep command

2013-11-23 Thread Luca Fabbri
On Sat, Nov 23, 2013 at 5:29 PM, Peter Otten <__pete...@web.de> wrote: > Luca wrote: > >> I'm trying to use sh (https://pypi.python.org/pypi/sh) for calling >> system grep command but it's now working as expected. >> >> An example: >> >> import sh >> sh.grep('abc', os.getcwd(), '-r') >> >>

Re: Using sh library with grep command

2013-11-23 Thread Peter Otten
Luca wrote: > I'm trying to use sh (https://pypi.python.org/pypi/sh) for calling > system grep command but it's now working as expected. > > An example: > > import sh > sh.grep('abc', os.getcwd(), '-r') > > But I get the ErrorReturnCode_1: exception, that I learned is the > normal exit

Re: Using sh library with grep command

2013-11-23 Thread Roy Smith
In article , Luca wrote: > I'm trying to use sh (https://pypi.python.org/pypi/sh) for calling > system grep command but it's now working as expected. > > An example: > > import sh > sh.grep('abc', os.getcwd(), '-r') > > But I get the ErrorReturnCode_1: exception, that I learned is the

Using sh library with grep command

2013-11-23 Thread Luca
I'm trying to use sh (https://pypi.python.org/pypi/sh) for calling system grep command but it's now working as expected. An example: import sh sh.grep('abc', os.getcwd(), '-r') But I get the ErrorReturnCode_1: exception, that I learned is the normal exit code for grep command when it not