President Barack Obama said Monday that American politicians in an era of partisanship should try to carry themselves more like Edward M. Kennedy, as politicians from both parties lauded the late senator's collegial spirit at the dedication of an institute that bears his name.