[issue23491] PEP 441 - Improving Python Zip Application Support

Paul Moore report at bugs.python.org
Thu Feb 26 15:41:15 CET 2015


Paul Moore added the comment:

Following on from that, the code to make an archive executable is currently

os.chmod(new_archive, os.stat(new_archive).st_mode | stat.S_IEXEC)

Should I use "... | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH"? If so, do I need to protect that with an "if not Windows" test? (I've tested the existing code and it does nothing on Windows, so I omitted the test at the moment). Is there any *other* way I should be making a file executable on Unix?

(Side note: Maybe there should be an os.make_executable(pathname) or similar that does the right thing in a cross-platform way?)

----------

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


More information about the Python-bugs-list mailing list