[Qt-interest] newbie:facing issues with readallstdoutput and QProcess

john doe thebiggestbangtheory at gmail.com
Mon May 4 19:20:12 CEST 2009


On Sun, May 3, 2009 at 11:44 PM, Stephen Jackson <spjackson42 at gmail.com>wrote:

> On 04/05/09, john doe wrote:
> >
> > If I use program=python; and arguments << "version" or "-version" or
> > "--version" no stdoutput or stderror is read back!
> >  Can someone please help ?
> >
>
> The code you posted only reads stdout, not stderr. If you run python
> with the 3 different arguments you mention here, it writes to stderr
> not stdout. If you want to read stderr, the QProcess documentation
> explains how to do this.
>

Thanks for the answer :-), the problem is though if I try to run python -h,
I can see the output, but python --version won't work.!!!! I can't figure
out why a particular flag works and the other one does not!
[code]

program="python";

arguments << "-V" ; //arguments << "--version"
[/code]

does not work

[code]

program="python";

arguments << "-h" ;
[/code]

works!

Also, I want to run external programs and read their stdoutpout and
stderror. can I read in both into the same text box?



>
> Regards,
>
> Stephen Jackson
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090504/e2fb5d63/attachment.html 


More information about the Qt-interest-old mailing list