New submission from higer <higerinbeij...@gmail.com>: I just want to compare two files,one from windows and the other from unix. But I do not want to compare them through reading them line by line. Then I found there is a filecmp module which is used as file and directory comparisons. However,when I use two same files (one from unix,one from windows,the content of them is the same) to test its cmp function, filecmp.cmp told me false. Later, I found that windows use '\n\r' as new line flag but unix use '\n', so filecmp.cmp think that they are different,then return false.
I think maybe it's a bug. If filecmp.cmp can support two platform files with the same content and only the diffrent last newline flag, that's would be wonderful. ---------- components: Library (Lib) messages: 89498 nosy: higer severity: normal status: open title: filecmp.cmp can not compare two files from different OS with the same content type: feature request versions: Python 2.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6306> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com