On Monday 13 October 2003 1:41 am, Russell Valentine wrote: > I'm having trouble sometimes figuring out what Python datatype goes with > the C++ datatype. > > An example a 2x2 grayscale QImage: > > **C++ Define > > QImage ( uchar * yourdata, int w, int h, int depth, QRgb * colortable, int > numColors, Endian bitOrder ) > > > How do you know what type to use for uchar *yourdata?
Unless the documentation says otherwise, uchar * corresponds to a Python string. So your buffer initialisation should be something like... buffer = "\xff\x00\xff\x00" Phil _______________________________________________ PyKDE mailing list [EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde