Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > redirecting standard error

Reply
Thread Tools

redirecting standard error

 
 
Rob Z
Guest
Posts: n/a
 
      12-02-2004
I use popen in C++ to grab the standard output from Unix commands. Is
there a similarly simple and fast way to grab standard error as well?
I understand Python has different popen commands for different
streams, but don't know about C++.

Thanks
 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      12-02-2004
Rob Z wrote:
> I use popen in C++ to grab the standard output from Unix commands. Is
> there a similarly simple and fast way to grab standard error as well?
> I understand Python has different popen commands for different
> streams, but don't know about C++.


C++ doesn't have popen. It's your OS (UNIX) that does. And if Python
can do it, there is nothing to stop your C++ program from doing it too.
However, it's beyond the scope of this newsgroup, since it's OS-specific.
Try comp.os.<your_os>.programmer.

V
 
Reply With Quote
 
 
 
 
Default User
Guest
Posts: n/a
 
      12-02-2004
Victor Bazarov wrote:

> Rob Z wrote:
> > I use popen in C++ to grab the standard output from Unix commands.
> > Is there a similarly simple and fast way to grab standard error as
> > well? I understand Python has different popen commands for
> > different streams, but don't know about C++.

>
> C++ doesn't have popen. It's your OS (UNIX) that does. And if Python
> can do it, there is nothing to stop your C++ program from doing it
> too. However, it's beyond the scope of this newsgroup, since it's
> OS-specific. Try comp.os.<your_os>.programmer.



Or comp.unix.programmer.



Brian
 
Reply With Quote
 
Alex Vinokur
Guest
Posts: n/a
 
      12-03-2004

"Rob Z" <> wrote in message news: om...
> I use popen in C++ to grab the standard output from Unix commands. Is
> there a similarly simple and fast way to grab standard error as well?
> I understand Python has different popen commands for different
> streams, but don't know about C++.
>
> Thanks


The response has been sent to news:comp.unix.programmer .

--
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn




 
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
How to redirect a "system" standard output and standard error to avariable (Linux) Venks Ruby 5 12-06-2007 12:21 AM
Redirecting Ruby on Rails Standard Output Joe Ruby 0 04-21-2006 09:44 PM
Redirecting standard out in a single namespace Fuzzyman Python 9 01-24-2006 11:40 AM
How standard is the standard library? steve.leach Python 1 04-18-2005 04:07 PM
Redirecting standard input for external application Gerrit Hulleman C++ 1 04-29-2004 07:08 AM



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