Python: Allow unhooking commands and prints by name