From: Just van Rossum Date: Sun, 20 Oct 2002 17:14:28 +0000 (+0000) Subject: cd to users home dir if no current dir has been set. Fixes bug #625734 X-Git-Tag: v2.3c1~3714 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7aa7f2eb0d87e23f218a0a813527f28ac4a4d228;p=python cd to users home dir if no current dir has been set. Fixes bug #625734 --- diff --git a/Mac/Tools/IDE/PythonIDEMain.py b/Mac/Tools/IDE/PythonIDEMain.py index fb02100be7..44fea3c082 100644 --- a/Mac/Tools/IDE/PythonIDEMain.py +++ b/Mac/Tools/IDE/PythonIDEMain.py @@ -43,6 +43,11 @@ class PythonIDE(Wapplication.Application): self.quitevent) import PyConsole, PyEdit Splash.wait() + if sys.platform == "darwin": + if sys.argv and sys.argv[0].startswith("-psn"): + home = os.getenv("HOME") + if home: + os.chdir(home) # With -D option (OSX command line only) keep stderr, for debugging the IDE # itself. debug_stderr = None