Take a look at the KiCommand code and the draw_segment function:
"""Draws the line segment indicated by the x,y values
on the given layer and with the given thickness."""
board = pcbnew.GetBoard()
You can use functions in wxpointutil.py to help manipulate points if you need to.
A lot of functions in KiCommand deal with a variety of input types like strings, comma separated strings, lists and lists of lists: turning all of those to integers, so don't get confused by that while looking at that code. There's lots of useful functions in there.
If you're running the nightly, you might consider installing KiCommand and using that to draw segments. If you're trying to learn how to make significant scripted functionality, straight Python is the way to go.