replace perl reset script with python one

Fix #180
Fix #127