PyQt and DCOP Documentation

Eric Williams s-rube at
Mon Nov 10 03:20:20 CET 2003

Eric Williams wrote:

> I'm actually just trying to get the volume level out of noatun in a python
> script, if anyone can help me with an example. What, exactly, does one DO
> with a QByteArray in python?

Ok, figured out a workaround for that call; in case anyone else's having a
similar problem:
        def getvol(self):
                res ="volume()")
                if res.isValid():
                        return ord([-1])
                        return None


Where rc is a DCOPRef object hooked to noatun.

For whatever reason, returns a 4-byte array, so here you
take the last byte.  Am I doing that correctly, or is there a better way?

On to the next problem:
       def volup(self):
                curvol = int(self.getvol())
                newvol = curvol + 5
                res ="setVolume(%d)" % newvol)
                print "Setvol: ", res.isValid()

I've tried various mutations of this.  This doesn't work at all. Anybody
know how to do this?


s- should be removed to contact me...

More information about the Python-list mailing list