So is this a criminal president receiving justice, or a politically motivated prosecution?
A bit of both. He definitely did criminal things, but they look worse because Gaddafi was such a politically unpopular ("terrorist") leader in the west. If he'd got the same funding from the Obama regime, surely he would never have gone to prison.