[issue8231] Unable to run IDLE without write-access to home directory

Terry J. Reedy report at bugs.python.org
Tue Oct 27 20:39:28 EDT 2015


Terry J. Reedy added the comment:

Yes, that is what this issue *is* about.  IDLE, like Python itself, expects to be run on machines that users can write to normally, that have not been crippled by bureaucratic policies, or by users. The editor is useless if the user cannot write files somewhere.  None of this is specific to Windows.

Ned's idea of a temporary directory seems easy.  Change the warning and replace'raise SystemExit' with 'td = tempfile.TemporaryDirectory(); userDir = td.name' (see msg222694).  For 2.7, however, TemporayDirectory is not available. For the underlying mkdtemp, the user "is responsible for deleting the temporary directory and its contents when done with it."  (I presume failure of apps to do this is why temp file cleanup is needed.)  My inclination for 2.7 would be to copy a stripped down copy of TemporaryDirectory with just the finalizer code.  In fact, since we do not need or want the implicit cleanup warning (do we?), we could do that for all versions.

We do not have to accommodate all possibilities. One report, possibly on Stackoverflow, was from a user whose home dir and, I presume, appdata dir, were on a remote server.  Maybe he also had an offline home dir, I don't remember.  In any case, IDLE was not happy with the setup.

As I said before, permanently and unconditionally moving user config files on Windows will break compatibility with all previous releases, so I would not do that unless we decide to break compatibility anyway, for reasons other than MS's recommendations.  However, after a general solution is applied we could consider in a separate issue using Appdata as future-looking, Windows-specific alternative to a temporary directory.  However, this would require careful though lest we end up with two userdirs because the non-writability of homedir is only temporary.

----------
type: behavior -> enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8231>
_______________________________________


More information about the Python-bugs-list mailing list