I want to generate C code via Python. The issue is that I want to initialise struct variables which are deeply nested with other structs.
For example:
In header files, I have structs like this
typedef struct
{
uint8_t var1
uint32_t var2
float var3
Type1 var4
}Type2
typedef struct
{
uint8_t var5
uint32_t var6
float var7
}Type1
in a C-File, I initialize a variable of Type2.
Type2 my_var.
Now i want in Python a list of strings like:
my_var.var4.var5
and more nested
my_var.var4.var6
my_var.var4.var7
my_var.var1
my_var.var2
my_var.var3
I use pyclibrary as module for parse .h and .c files.
Does Python has a function to do this easily?