Use a better approach to locating IDLE's default configuration,
authorFred Drake <fdrake@acm.org>
Mon, 10 Apr 2000 16:27:47 +0000 (16:27 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 10 Apr 2000 16:27:47 +0000 (16:27 +0000)
allowing it to be run from anywhere, including through a symlink to
the actual idle.py script.

Tools/idle/idle.py

index 71fdce56bb1e360afc06ea03ec943a5563e0f305..f42327c9b39966b8eba3f6af225b7d73ec1d6855 100755 (executable)
@@ -4,7 +4,7 @@ import os
 import sys
 import IdleConf
 
-idle_dir = os.path.split(sys.argv[0])[0]
+idle_dir = os.path.dirname(IdleConf.__file__)
 IdleConf.load(idle_dir)
 
 # defer importing Pyshell until IdleConf is loaded