[partially solved] Re: [PyQt] KProcess setUsePty not there...
Wilbert Berendsen
wbsoft at xs4all.nl
Sat Apr 12 18:53:47 BST 2008
Op donderdag 3 april 2008, schreef Jim Bublitz:
> On Wednesday 02 April 2008 08:00, Wilbert Berendsen wrote:
> > Hi,
> >
> > I want to run a program that insists on reading from a terminal using
> > KProcess (from within PyKDE), but it seems KProcess::setUsePty() does not
> > exist:
> >
> > Python 2.5.1 (r251:54863, Mar 26 2008, 22:37:08)
> > [GCC 4.1.2 (Gentoo 4.1.2 p1.0.2)] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> >
> > >>> from kdecore import *
> > >>> p=KProcess()
> > >>> p.setUsePty(3,False)
>
> It's an error in not providing a #define for a conditional in the h file
> when generating PyKDE.
Is this a bug in KDE, in PyKDE or in Gentoo's compile setup?
> You can fix it in sip/kdecore/kprocess.sip by changing this (near line
> 193):
>
> %If ( KDE_3_2_0 - KDE_3_4_0 )
> void setUsePty (KProcess::Communication, bool);
> KPty* pty () const;
> %End
>
> to this:
>
> %If ( KDE_3_2_0 - )
> void setUsePty (KProcess::Communication, bool);
> KPty* pty () const;
> %End
>
> and then rebuild with
>
> python configure.py -lkdecore && make && su -c"make install"
I did that and yes, now setUsePty works. Thanks!
A remaining question, as I can't ask the users of my LilyKDE module to
recompile PyKDE: does setUsePty work in mainstream distributions like Ubuntu?
Thanks,
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