[issue21027] difflib new cli interface

2014-05-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry guys, I appreciate your enthusiasm, but when I designed the code, I intentionally put it in the Tools/scripts section rather than as a command-line option for a library module. As the author of the context_diff and unified_diff, I was concerned that

[issue21027] difflib new cli interface

2014-05-16 Thread Claudiu.Popa
Claudiu.Popa added the comment: Attached the new version of the patch which removes the resource warnings. Raymond, I disagree on certain points. `difflib -m` does help the development, especially for platforms where there aren't many readily available alternatives (like Windows). I gave an

[issue21027] difflib new cli interface

2014-05-15 Thread STINNER Victor
STINNER Victor added the comment: After more thought, I think this should remain in tools as a demo. I disagree, I like the command line interface. It's very useful on Windows for example. It's also useful on UNIX embedded devices where Python is installed, but only a few UNIX tools. If you

[issue21027] difflib new cli interface

2014-05-14 Thread Claudiu.Popa
Changes by Claudiu.Popa pcmantic...@gmail.com: Added file: http://bugs.python.org/file35247/issue21027_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21027 ___

[issue21027] difflib new cli interface

2014-05-14 Thread STINNER Victor
STINNER Victor added the comment: $ ./python -m difflib -u a.py b.py ... sys:1: ResourceWarning: unclosed file _io.TextIOWrapper name='a.py' mode='r' encoding='UTF-8' sys:1: ResourceWarning: unclosed file _io.TextIOWrapper name='b.py' mode='r' encoding='UTF-8' It looks like files are not

[issue21027] difflib new cli interface

2014-05-14 Thread STINNER Victor
STINNER Victor added the comment: The HTML output contains an encoding in the head: meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 / The problem is that sys.stdout may use a different encoding. For example, my locale encoding is UTF-8. So python -m difflib -um a.py b.py

[issue21027] difflib new cli interface

2014-05-14 Thread Berker Peksag
Berker Peksag added the comment: The HTML output contains an encoding in the head: meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 / See issue2052 for this. -- ___ Python tracker rep...@bugs.python.org

[issue21027] difflib new cli interface

2014-05-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: After more thought, I think this should remain in tools as a demo. We don't have an objective to create command-line tools to compete with existing well developed, tested tools. For the most part, our command line tools exposed through the -m option are

[issue21027] difflib new cli interface

2014-04-15 Thread Claudiu.Popa
Claudiu.Popa added the comment: Raymond, any news on this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21027 ___ ___ Python-bugs-list mailing

[issue21027] difflib new cli interface

2014-04-02 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21027 ___ ___

[issue21027] difflib new cli interface

2014-03-22 Thread Claudiu.Popa
New submission from Claudiu.Popa: Hello! The attached patch proposes a new command line interface to difflib module. Currently, `python -m difflib` does nothing useful, it runs the doc suite for the difflib module. Right now, there are a couple of modules in the standard lib, which provides

[issue21027] difflib new cli interface

2014-03-22 Thread Claudiu.Popa
Changes by Claudiu.Popa pcmantic...@gmail.com: Added file: http://bugs.python.org/file34572/difflib_cli.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21027 ___

[issue21027] difflib new cli interface

2014-03-22 Thread Claudiu.Popa
Claudiu.Popa added the comment: Here's a new patch which addresses the comments of berker.peksag. Thank you for the review! -- Added file: http://bugs.python.org/file34573/issue21027.patch ___ Python tracker rep...@bugs.python.org

[issue21027] difflib new cli interface

2014-03-22 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21027 ___

[issue21027] difflib new cli interface

2014-03-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: This looks promising to me. I'll look in more detail shortly. -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21027