Change the script to a python script.

Ok, so it looks like regular functionality works but it still needs testing. There is no error reporting and the actual poisoning detection needs to be tested.