エントリーの編集
![loading...](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/common/loading@2x.gif)
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント2件
- 注目コメント
- 新着コメント
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
![アプリのスクリーンショット](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/entry/app-screenshot.png)
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Pythonで学ぶ「詳解 UNIXプログラミング」(その5) 第5章 標準入出力ライブラリ - atsuoishimoto's diary
5.1 getc()とputc()を用いて標準出力へコピーする import sys while True: c = sys.stdin.read(1) if no... 5.1 getc()とputc()を用いて標準出力へコピーする import sys while True: c = sys.stdin.read(1) if not c: break sys.stdout.write(c) 5.2 fgets()とfputs()を用いて標準出力へコピーする import sys for line in sys.stdin: sys.stdout.write(line) Pythonにはgetc()/putc()/fgetc()/fput()がないので、ここでは似たような機能で再実装してみた。 サンプル5.1 はsys.stdin.read()を使って、一文字ずつ読み込んでいる。サンプル5.2では、sys.stdinをfor文を使って読み込み、一行ずつ出力している。 5.3 さまざまな標準入出力ストリームのバッファリング方式を表示する 残念ながら、Pyth
2011/03/19 リンク