[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 ex

[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 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 fe

[issue21027] difflib new cli interface

2014-05-14 Thread Berker Peksag
Berker Peksag added the comment: > The HTML output contains an encoding in the : > See issue2052 for this. -- ___ Python tracker ___ ___

[issue21027] difflib new cli interface

2014-05-14 Thread STINNER Victor
STINNER Victor added the comment: The HTML output contains an encoding in the : 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 > test.html" produces an HTML file encoded in UTF-8 but announcing a ISO 8

[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 Claudiu.Popa
Changes by Claudiu.Popa : Added file: http://bugs.python.org/file35247/issue21027_1.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue21027] difflib new cli interface

2014-04-15 Thread Claudiu.Popa
Claudiu.Popa added the comment: Raymond, any news on this? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue21027] difflib new cli interface

2014-04-02 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[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 ___ _

[issue21027] difflib new cli interface

2014-03-22 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[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 _

[issue21027] difflib new cli interface

2014-03-22 Thread Claudiu.Popa
Changes by Claudiu.Popa : Added file: http://bugs.python.org/file34572/difflib_cli.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[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 hel