hackerkid / hackerkid/codejam-commandline

Line ending weirdness

オープン
#23 コメント 0 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。