[vtkusers] Python wrapping syntax

tom fogal tfogal at apollo.sr.unh.edu
Thu Jun 10 15:44:55 EDT 2004


In a vtk object I created, I have a function which takes a
double pointer, more specifically an array of strings. I was
wondering what the syntax for accessing it in python might
become.

for example:
myObject::myFunc(char **args) { this->Args = args; }

and used like
char *args[] = {"arg1", "arg2", "arg3", NULL};
myObject *mine = myObject::New();
myObject->myFunc(args);

1) What is the correct python syntax to ensure these get
translated back to my C++ as an array of strings?

2) I imagine I have to use pythons 'None' in replacement for
NULL? Later code relies on the list being NULL-terminated;
will this produce the correct sentinel? Sorry this one is more
of a python question...

Thanks,

-tom



More information about the vtkusers mailing list