Search code examples
pythonmacoscrashosx-snow-leopardpython-idle

Python IDLE crash on mac Snow Leopard


I have a Mac OS X 10.6 64bit, the problem is simple:

When I try to run something on the Python IDLE, it crashes. It crashes also when I try simply to copy/paste something.

It's happening with all python versions I've tried: 2.5 2.6 2.7 and 3.3.
I avoided this problem by using another IDE and running on it but it is not a solution. Thanks


Solution

  • Sometimes I have had this problem if I try to run the IDLE directly. Try calling the IDLE from python itself. Do this by creating a file containing:

        from idlelib.PyShell import main
        if __name__ == '__main__':
            main()
    

    save it as like run_idle.py then you can run the command: python run_idle.py

    This will open up the IDLE that is appropriate to the version of python installed on your system. I also use this technique to successfully run the IDLE within a virtual environment.