Would this work for you:
from dolfin import *
mesh = UnitSquareMesh(2,2)
class Boundary(SubDomain):
def inside(self, x, on_boundary):
tol = 1E-14
return on_boundary and near(x[0], 0, tol)
boundary = Boundary()
ff = FacetFunction('size_t',mesh)
boundary.mark(ff,1)
It_mesh = SubsetIterator(ff, 1)
for c in It_mesh:
print (c.midpoint().x(), c.midpoint().y())