Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: subprocess.Popen and replacing the shell pipe line

Reply
Thread Tools

Re: subprocess.Popen and replacing the shell pipe line

 
 
jepler@unpythonic.net
Guest
Posts: n/a
 
      09-22-2005
Probably the quoting of the argument to grep.
try this instead:
> p1 = Popen(['grep', 'Sep 22', '/var/log/auth.log'], stdout=PIPE)

etc

Jeff
 
Reply With Quote
 
 
 
 
k33rni@gmail.com
Guest
Posts: n/a
 
      09-23-2005
by the way, you're re-inventing the wheel somewhat, check out the
stdlib pipes module (http://docs.python.org/lib/module-pipes.html)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bypass shell - pipe into child pid and receive otput Mirco Wahab Perl Misc 1 02-12-2007 04:17 PM
subprocess.Popen and replacing the shell pipe line Tom Brown Python 0 09-22-2005 10:38 PM
Replacing - and not Replacing... Rob Meade ASP General 5 04-11-2005 06:49 PM
[named pipe] i wanna know about validate of pipe handle of client lee, wonsun C++ 1 11-02-2004 04:29 AM
Why does IO::Pipe::END generate an EXCEPT pipe message? lvirden@gmail.com Perl Misc 1 06-02-2004 02:17 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57