Draw line between 2 point using knife_tool

Hi!
How I can draw line between 2 point using knife_tool?

Knife tool is interactive, in the console it does not look you can use it.
You have to take a look at the underlaying functions:

https://docs.blender.org/api/current/bpy.ops.mesh.html