update python thread