Multiple pointers

Geoffrey Wilfart wilfartg at hotmail.com
Fri Jan 4 17:03:57 CET 2002


Hi!

I would like to export to Python a C function that takes pointers of
pointers as arguments, and fills them.
My idea is to use nested lists to represent the data under Python, but
I have no idea how to do it.

Typically, if the base C function is:
  void my_function(char **arg), 

I'd like to call the wrapper function as:
a = []
wrapper(a)

with the resulting a containing the list of strings generated by
my_function,
or (this is an independent example):

  void my_function(char ***arg), associated to:

a = [[]]
wrapper(a)

or:

  void my_function(char ***arg1, char **args), associated to:

a = [[]]
b = []
wrapper(a,b)

Does anyone have an idea how I could write such a wrapper function ?

Thanks

Geoffrey



More information about the Python-list mailing list