Python
とあるURLに連続でアクセスする軽い負荷テスト的なものをpythonで書いたのでその時のメモです
自分用メモ 雛形として後で使うBmObjectのcount_with_fooとcount_with_barの比較がしたい場合は、 下記のようにします。 width=20の指定は、コンソールに結果を表示するときの横幅 # -*- coding: utf-8 -*- from benchmarker import Benchmarker class Bench…
自分用メモ 全部読みたいとき def read_file(filepath): with open(filepath, 'r') as stream: contents = stream.read() print contents 1行ずつ def read_file(filepath): with open(filepath, 'r') as stream: for line in stream: print line
いろいろと都合がありPythonをはじめてみた。python初心者として、入門時に参考にしたリンク一覧とりあえず、基礎文法最速マスターシリーズを読んだ http://d.hatena.ne.jp/dplusplus/20100126PHPerが読むべき(英語サイト) http://www.ibm.com/developerwork…