Well there are some mistakes in the above code.
Need to pass the pointer address as an unsigned long/int to the python module. So
void getmodelparam(long pModelParam)
//has to become
void getmodelparam(unsigned long pModelParam)
//and
PyObject *pResult = PyObject_CallFunction(pFunc,"i", pModelParam) ;
// has to become
PyObject *pResult = PyObject_CallFunction(pFunc,"k", pModelParam) ;
and then in the python file:
def modifymodelparam(m):
n = ctypes.cast(m, ctypes.POINTER(someTime))
print (n.contents.seconds)
print (n.contents.nanoseconds)