So, like was mentioned before, there’s no python function to do boolean operations on meshes. But, there’s my boolean system, which works better overall than the current built in system (except in certain weird cases that I’m working on), and happens to be a python script. There’s a post about it in this forum. At the end of the script is an example to do exactly what you want:
DoBool()
#oA=Object.Get("Cookie")
#oB=Object.Get("Cutter")
#print oA
#print oB
#Intersection(Object.Get("Cookie"),Object.Get("Cutter"))
#Difference(Object.Get("Cookie"),Object.Get("Cutter"))
If you cange that bit to:
oA=Object.Get("Cookie")
oB=Object.Get("Cutter")
Difference(Object.Get("Cookie"),Object.Get("Cutter"))
It will get an object named “Cookie”, and do a difference operation, subtracting the object named “Cutter”.