some useful tools of python code