some tool coding with python