I just tried adding the following line to the assignment.py example file, and it seemed to print out the runtime just fine.
print m.Runtime
Are you sure you're calling it after m.optimize() but before calling m.update() or anything else that resets the model run time? Try printing the run time immediately after m.optimize().
EDIT: I just realized that the assignment.py was one of mine, not the example problem.
from gurobipy import *
from numpy import *
numT = 300;
numC = 300;
Assignment = random.random((numT,numC))
m=Model("Assignment")
X = []
for t in range(numT):
X.append([])
for c in range(numC):
X[t].append(m.addVar(vtype=GRB.BINARY,name="X%d%d"% (t, c)))
m.update()
m.modelSense = GRB.MAXIMIZE
constraintT = []
constraintC = []
for t in range(numT):
constraintT.append(m.addConstr(quicksum(X[t][c] for c in range(numC)) == 1 ,'constraintT%d' % t))
for c in range(numC):
constraintT.append(m.addConstr(quicksum(X[t][c] for t in range(numT)) == 1 ,'constraintC%d' % t))
m.setObjective(quicksum(quicksum([X[t][c]*Assignment[t][c] for c in range(numC)]) for t in range(numT)))
m.update()
m.optimize()
print 'runtime is',m.Runtime