directory becomes sys.path[0]. What is wanted is the directory from which
IDLE was called.
Insert the current working directory in the path if it isn't there
already.
import rpc
import RemoteDebugger
+# Preserve 2.2 compatibility for Mac OS X:
import boolcheck
IDENTCHARS = string.ascii_letters + string.digits + "_"
dir = os.path.abspath(dir)
if not dir in sys.path:
sys.path.insert(0, dir)
+ else:
+ dir = os.getcwd()
+ if not dir in sys.path:
+ sys.path.insert(0, dir)
# check the IDLE settings configuration (but command line overrides)
edit_start = idleConf.GetOption('main', 'General',
'editor-on-startup', type='bool')