I managed to use the bisect operator from a python script like this:
bpy.ops.mesh.bisect(plane_co=(curx, cury, curz+dz),
plane_no=(0, 0, 1),
use_fill=False,
clear_inner=False,
clear_outer=False,
threshold=0.0001,
xstart=0,
xend=0,
ystart=0,
yend=0,
cursor=1002)
It works but nothing works after such in the script. To make it work I need to be in edit mode and have the mesh already selected. (if someone can also explain how to just change to edit mode and do a select all, or even how to select the part I want even better) it's almost as if this command is clearing the selection so it does not work anymore. Do i need to wait for some process or update something before using the same command (with other parameters of course)?