[PyQt] kdecore.KProcess.Communication enum not OR-able

Jim Bublitz jbublitz at nwinternet.com
Sat Apr 12 18:10:57 BST 2008


On Saturday 12 April 2008 06:04, Wilbert Berendsen wrote:
> 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)

Phil suggests that this:

p.start(KProcess.NotifyOnExit, KProcess.Communication (KProcess.Stdin | 
KProcess.Stdout))

should work - I haven't tried it.

A couple of other notes: 1. This enum isn't available in KDE4 and 2. A lot of 
the enums in KDE4/PyKDE4 (and Qt4) will require similar strict type-checking 
(everything using QFlags).

Jim


More information about the PyQt mailing list