[PyQt] kdecore.KProcess.Communication enum not OR-able
Wilbert Berendsen
wbsoft at xs4all.nl
Sat Apr 12 14:04:48 BST 2008
Hi,
The KDE docs say that you can OR the values of the
kdecore.KProcess.Communication enum when start()ing a KProcess.[1]
However that seems not to be possible:
>>> from kdecore import *
>>> p=KProcess()
>>> p.setExecutable('cat')
True
>>> p.start(KProcess.NotifyOnExit, KProcess.Stdin | KProcess.Stdout)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: argument 2 of KProcess.start() has an invalid type
>>> type(KProcess.Stdin | KProcess.Stdout)
<type 'int'>
>>> type(KProcess.Stdin)
<class 'kdecore.Communication'>
>>>
So I can only use the predefined values of the Communication enum (All,
AllOuput etc.). Is this a bug and is there a workaround to start a KProcess()
and only communicate with stdout and stdin and not stderr?
[1]http://api.kde.org/3.5-api/kdelibs-apidocs/kdecore/html/classKProcess.html#31e69eb366082bb93bbdc31e6e281019
TIA,
w best regards,
Wilbert Berendsen
--
http://www.wilbertberendsen.nl/
"You must be the change you wish to see in the world."
-- Mahatma Gandhi
More information about the PyQt
mailing list