enjoying the view wrote: > Imported normally this would work fine. The list given as a parameter > would be one element larger. But when the stubs are generated, the > function doesn't return anything and the list is appended in the server > and the client-side list is left untouched. At first I thought the > solution was easy, just return the changed parameters and place them in > the parameter variables in the client stub: > def add_elm(list): > send_message({'funcname': 'add_elm', 'args': (list)}) > response = receive_message() > (list) = response.get('args') > return response.get('result') > > The problem is, this doesn't work. The original list doesn't point to > the changed list. I have been trying to figure this out and it seems > that if I just assign to the list variable it just modifies the local > (to the function) name space, and that those changes aren't reflected > in the list in the original name space.
Try list[:] = response.get('args') this will change the value of the list passed in. Kent -- http://mail.python.org/mailman/listinfo/python-list