Hello, after using 2to3 --write over some scripts, I found it very cumbersome having to run `chmod +x` on each of them afterwards.
The attached patch is a possible way to fix this issue. It'd be great if somebody could apply it, or write a more appropriate fix. Many thanks in advance! P.S.: Please CC me on replies. -- Adeodato Simó dato at net.com.org.es Debian Developer adeodato at debian.org Listening to: Manolo García - Prendí la flor
Index: Lib/lib2to3/main.py =================================================================== --- Lib/lib2to3/main.py (revision 67665) +++ Lib/lib2to3/main.py (working copy) @@ -6,6 +6,7 @@ import os import logging import optparse +import shutil from . import refactor @@ -39,6 +40,7 @@ # Actually write the new file super(StdoutRefactoringTool, self).write_file(new_text, filename, old_text) + shutil.copymode(backup, filename) def print_output(self, lines): for line in lines:
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com