Is he drinking? If you have to soak him to get him to move his bowels maybe he is not hydrated enough? Dehydration and constipation go hand in hand. What's your humidity inside of the enclosure? Does he have a full water bowl every day? Do you ever let it (the water bowl) get completely dry or too low for him to drink out of?

When was the last time he shed? Ball pythons will frequently deficate either during there sheds or shortly after. I would at least wait for 48 hours after his next shed if it has indeed been "months".

What's your feeding schedule? Too large and too frequent feedings can also cause blockages.

-adam