Countries that have been led by an individual (through a declaration, revolution, war, ...) have constitutions heavily influenced by that leader, for better or worse.
History has shown that simply running elections is not sufficient, because often the party winning the very first elections would in effect write the constitution. After that, there is the potential that every party winning subsequent elections would be inclined to annul it and write another.
How have countries that have had grassroots revolutions (such as the current upheaval in the Middle East) reached a consensus when faced with having to write a Constitution? Are there any specific examples of countries that have recently undergone similar turmoil and successfully emerged with something that others would consider a reasonably fair and impartial constitution? If so, what made their process unique enough to be successful?