[issue39927] IDLE.app fails on macOS 10.15 if denied access to Documents

Terry J. Reedy report at bugs.python.org
Wed Mar 11 19:17:44 EDT 2020


Terry J. Reedy <tjreedy at udel.edu> added the comment:

idlemain.py should be documented within idlelib* (I will do that, README.txt and maybe macosx.py).  Currently, the chdir is only part of idle.app, not idle on Mac, because it does not happen when starting IDLE in Terminal.  This is confusing.  As near as I can tell, it is not needed in idlemain.py.  If so, it should be moved (revised) into idlelib startup code so it always runs on Mac.  How about something like:

try:
    os.chdir(os.path.expanduser('~/Documents'))
except OSError:  # I presume
    <display tk  message box: cannot access Documents, explain how to change>
    os.chdir(os.path.expanduser('~'))  # Can this fail?

* The only mention of 'IDLE.app' in idlelib is in the news item for #27310, where you mention 'idlemain.py', sans path.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39927>
_______________________________________


More information about the Python-bugs-list mailing list