[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] kdecore.KProcess.Communication enum not OR-able
From:       Jim Bublitz <jbublitz () nwinternet ! com>
Date:       2008-04-12 16:37:34
Message-ID: 200804120937.34782.jbublitz () nwinternet ! com
[Download RAW message or body]

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)
>
> 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?

It appears that sip is doing strict checking for the KProcess.Communication 
type, and KProcess.Stdin | KProcess.Stdout is not defined in that enum type.

Jim

> [1]http://api.kde.org/3.5-api/kdelibs-apidocs/kdecore/html/classKProcess.ht
>ml#31e69eb366082bb93bbdc31e6e281019
>
> TIA,
> w best regards,
> Wilbert Berendsen
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic