#! /usr/bin/env python import os import sys from idlelib import IdleConf # Remove the funny -psn_xxx_xxx argument if len(sys.argv) > 1 and sys.argv[1][:4] == '-psn': del sys.argv[1] idle_dir = os.path.dirname(IdleConf.__file__) IdleConf.load(idle_dir) # defer importing Pyshell until IdleConf is loaded from idlelib import PyShell PyShell.main()