A python hooks system