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

Re: Using sh library with grep command

2013-11-23 Thread Roy Smith
In article mailman.3088.1385218947.18130.python-l...@python.org, Luca luca...@gmail.com 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

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 code for

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') But I get the