blender-2.50

How to create a simple mesh in Blender 2.50 via the Python API

I would like to create a simple mesh in Blender (2.50) via the Python API but the examples from the API documentation don't work yet. I tried the following but it's from API 2.49 from Blender import * import bpy editmode = Window.EditMode() # are we in edit mode? If so ... if editmode: Window.EditMode(0) # leave edit ...