I think drinking lots of fluid is the most important medicine for constipation. Also, there is a herb called Triphala which can be used as laxative or tonic, in order to treat constipation. It can be taken early in the morning with an empty stomach and before sleeping in the night.