Python script fail, look in the console for now
You will need to open the system console, which is found by going to the Window menu at the top and choosing Toggle System Console. Do note that closing the console via the X button at the top right will close Blender as well, so if you want to close the console use the Toggle System Console menu option again.

EDIT: I just tried the code you have and it works fine. I think your issue is how you are trying to execute the code. To execute this code in the BGE you will need to have an object that has a sensor (such as an always sensor with true level triggering enabled) connected to a python controller with your script selected.

Then play your game and you will see your line. Simply running the script via the text editor will cause it to fail.