Hi all,
sorry for spamming this mailinglist but i feel that i need to share my frustration with you all ;)
Also i have changed the subject of this topic to something more appropriate.

As i mentioned in my previous post:

client = playerc_client(None, 'localhost', 6665)
cam = playerc_camera(client, 0)
if cam.subscribe(PLAYERC_OPEN_MODE) != 0:
  raise Exception(playerc_error_str())
if client.read() == None:
  raise Exception(playerc_error_str())

img = cv.CreateImageHeader((cam.width,cam.height), cv.IPL_DEPTH_8U, cam.bpp/8)
cv.SetData(img, cam.image, cam.image_count)
cv.ShowImage ('Camera', img)

It Errors on the last line and gives:
TypeError: IplImage argument 'image' has no data

Note that i can save frames from the camera with "cam.save('frame.ppm')" in worst case we can save every frame to file and then read them... but we think this wont be very efficient.

This morning i thought/hoped that i had found the solution for my problem when looking at this:

However none of the two examples works for me:
import array
im_array = array.array('B') #array of unsigned byte

Creating a PIL image object is similar:

import Image
im = Image.new('RGB',(cam.width,cam.height))

Both examples gives me same error on:
and on:

The error message is:
TypeError: 'SwigPyObject' object is unsubscriptable

Any ideas on how to fix this?

Im beginning to suspect that it might be a problem with the swig bindings:
In python documentation for PyBuffer_FromMemory:
PyObject* PyBuffer_FromMemory(void *ptr, Py_ssize_t size)
But in: libplayerc/bindings/python/playerc.i 

%typemap(out) uint8_t [ANY]
   $result = PyBuffer_FromMemory((void*)$1,sizeof(uint8_t)*$1_dim0);

could the problem be that "sizeof(uint8_t)*$1_dim0" be of type Py_ssize_t ?
Any suggestions or ideas on how to resolve this problem is greatly appreciated!
Im part of a group of students at Uppsala University, Sweden ... we have decided to use the Python bindings ... and it would be nice to get this working for us.

Kind regards