I am not 100% sure what you are trying to do or why. I did figure out how to solve your problem one way. Here’s the solution I used:
import Blender
from Blender import *
def makeCube(x,y,name,passedMesh,passedScene):
ob = Object.New("Mesh",name)
ob.LocX=x
ob.LocY=y
ob.link(passedMesh)
passedScene.link(ob)
return ob
def makeEmpty (x,y,name, passedScene):
ob = Object.New("Empty",name)
ob.LocX=x
ob.LocY=y
passedScene.link(ob)
return ob
#Create a cube with materials.
localScene = Scene.GetCurrent()
matRed = Blender.Material.New('matRed')
matRed.rgbCol = 1,0,0
redMesh = Mesh.Primitives.Cube(1)
redCube = makeCube(0,0,"redCube",redMesh,localScene)
cubeGroupName = "redCube"
cubeGroup = Blender.Group.New(cubeGroupName)
cubeGroup.objects = [redCube, ]
redMesh.materials = [matRed]
#Create an empty.
tempEmpty = makeEmpty(0,10,"Empty",localScene)
tempEmpty.enableDupGroup = True
tempEmpty.DupGroup = cubeGroup
Redraw(-1)
localScene.update(1)
As you see I used the Group module to create a new group with given name. Then I assigned the cube object to the group and finally set this group to DupGroup. I hope this gives you some clue about how to solve the issue.