How to combine Meshes created with python
You can use the bmesh module to do this. You start with creating a new, empty bmesh object with bm = bmesh.new(), then every time you want to add a mesh to this bmesh, you can use bm.from_mesh( mesh ):

import bpy, bmesh

# Reference to existing meshes, replace these with your code generated meshes
m1 = bpy.data.meshes[0] 
m2 = bpy.data.meshes[1]

bm = bmesh.new()

bm.from_mesh( m1 ) # Add mesh 1 to bmesh
bm.from_mesh( m2 ) # Add mesh 2 to bmesh

m3 = bpy.data.meshes.new( "newMesh" )
bm.to_mesh( m3 )

o = bpy.data.objects.new( "new", m3 )
bpy.context.scene.objects.link( o )