python magic tools