It is possible to change between 3D_cursor and selection_box using python script?

Hello all,
It is possible to change between 3D_cursor and selection_box using python script? There is no code because I don’t have any idea on how to swap 3d cursor with select_box in python and vice versa. Is there any short method for this?