from ctypes import * p1 = pointer(c_long(10)) pointer(p1).contents.contents = c_long(20) # the following might be expected to print c_long(20) twice print p1.contents print pointer(p1).contents.contents