]> granicus.if.org Git - python/commitdiff
* Change working directory to the users home
authorRonald Oussoren <ronaldoussoren@mac.com>
Fri, 19 May 2006 18:17:31 +0000 (18:17 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Fri, 19 May 2006 18:17:31 +0000 (18:17 +0000)
  directory, that makes the file open/save
  dialogs more useable.
* Don't use argv emulator, its not needed
  for idle.

Mac/OSX/IDLE/idlemain.py

index ace3950dfa88e18e212037e7f35d6b669a1c688f..eaebee871d385fb69b3cc7f7c1160bf20ee350a9 100644 (file)
@@ -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 @@ for idx, value in enumerate(sys.argv):
         del sys.argv[idx]
         break
 
-argvemulator.ArgvCollector().mainloop()
+#argvemulator.ArgvCollector().mainloop()
 if __name__ == '__main__':
     main()