hackerkid / hackerkid/codejam-commandline

Line ending weirdness

未關閉
#23 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
auto-migrated Priority-Medium Type-Defect
主要語言
Python
星號
0
分支
0
PR 合併指標
30 天內沒有已合併 PR

描述

```
What steps will reproduce the problem?
1. Download input files in Cygwin (using Cygwin's python interpreter)

What is the expected output? What do you see instead?
I expect input files with UNIX line endings, I get DOS line endings

What version of the product are you using? On what operating system?
This works properly in real Linux, but something interesting is happening with
Cygwin's python.

I fixed this behaviour by modifying "lib/input_downloader.py", line 101, to use
mode 'w' instead of 'wt'. These should mean the same thing (I think), but at
least for me, 'wt' causes DOS line endings with Cygwin python (2.6.7). AFAIK
changing this to 'w' shouldn't break anything on other platforms.

I also changed line 94 of "lib/data_manager.py" in a similar way, for the sake
of aesthetics.

```

Original issue reported on code.google.com by `sumu...@gmail.com` on 9 Jun 2012 at 9:10

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。