That's a really, really hard question to answer without examining your setup.
Normally when people come here with IDLE problems someone tells them IDLE is crap, that they shouldn't use it, and then I come along and say, hey, it's not that bad but OS X is one of the most miserable programming environments in my experience that I will recommend you try something else. Not sure about Xcode's support, but Sublime Text is popular, I bet pycharm is on OS X (it's free, right?).
Due to the reasons discussed here
we will be moving to python-forum.io
on October 1, 2016.
This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.