build data communicate in python & c