Added Python include to avoid compiler problems on OSX.
Using "not" in place of "!"