In C we have
struct temp
{
unisgned int i[10];
char a[2][10];
}temp;
Like this i am making one structure in python:
integer_aray=[1,2,3,4,5]
string_array=["hello","world"]
format_="Qs"
temp = namedtuple("temp","i a")
temp_tuple = temp(i=integer_array,a=string_array)
string_to_send = struct.pack(format_, *temp_tuple)
When i am trying like this python 2.7 giving error
string_to_send = struct.pack(format_, *temp_tuple)
error: cannot convert argument to integer
I have to send the python structure as and array of integer and as an array of strings.Is there any way we can do by sending arrays without using ctypes ?