i am having a structure as below which i am writing in a binary file in C
typedef struct abc{
unsigned int year :12;
unsigned int Month :4;
unsigned int Date :5;
unsigned int Hour :5;
unsigned int Min :6;
unsigned int Sec :6;
unsigned int w :1;
unsigned int x :1;
unsigned int y :8;
unsigned int z :8;
unsigned int q :8;
}abc ;
i am filling the structure as follows:
abc.year=2020
abc.Month=2
abc.Date=31
abc.Hour=12
abc.Min=45
abc.Sec=25
abc.w=0
abc.x=1
abc.y=145
abc.z=100
abc.q=120
The output i am getting in the output file is as follows: E4 27 9F B5 99 91 64 78 The same thing i need to do with python..so please help me with this