[Python-checkins] r46050 - python/trunk/Mac/OSX/IDLE/idlemain.py

ronald.oussoren python-checkins at python.org
Fri May 19 20:17:32 CEST 2006


Author: ronald.oussoren
Date: Fri May 19 20:17:31 2006
New Revision: 46050

Modified:
   python/trunk/Mac/OSX/IDLE/idlemain.py
Log:
* Change working directory to the users home
  directory, that makes the file open/save
  dialogs more useable.
* Don't use argv emulator, its not needed
  for idle.


Modified: python/trunk/Mac/OSX/IDLE/idlemain.py
==============================================================================
--- python/trunk/Mac/OSX/IDLE/idlemain.py	(original)
+++ python/trunk/Mac/OSX/IDLE/idlemain.py	Fri May 19 20:17:31 2006
@@ -1,7 +1,15 @@
-import argvemulator
-from idlelib.PyShell import main
+"""
+Bootstrap script for IDLE as an application bundle.
+"""
 import sys, os
 
+from idlelib.PyShell import main
+
+# Change the current directory the user's home directory, that way we'll get
+# a more useful default location in the open/save dialogs.
+os.chdir(os.expanduser('~'))
+
+
 # Make sure sys.executable points to the python interpreter inside the
 # framework, instead of at the helper executable inside the application
 # bundle (the latter works, but doesn't allow access to the window server)
@@ -14,6 +22,6 @@
         del sys.argv[idx]
         break
 
-argvemulator.ArgvCollector().mainloop()
+#argvemulator.ArgvCollector().mainloop()
 if __name__ == '__main__':
     main()


More information about the Python-checkins mailing list