タグ

2006年6月7日のブックマーク (3件)

  • Pythonメモ

    型の比較 import types a = 'string' if type(a) == types.StringType: print 'yes' else: print 'no' type()で型が取得できる。typesモジュールにはシステム定義型の値が用意されている。 文字列型 unicode型あるいはstr型であるかどうかは、basestringを使うと判定できる。 a = 'hello' b = 150 c = u'漢字' isinstance(a, basestring) --> True isinstance(b, basestring) --> False isinstance(c, basestring) --> True basestringは、ビルトイン関数として定義されているが、呼び出したり、インスタンス化することができない。 ジェネレーター関数(generator

    mhrs
    mhrs 2006/06/07
  • rlwrap, Emacs midi-input and p5httpd

    Software rlwrap rlwrap is a 'readline wrapper' that uses the GNU readline library to allow the editing of keyboard input for any other command. Input history is remembered across invocations, separately for each command; history completion and search work as in bash and completion word lists can be specified on the command line. What do you need to compile and run it A newer (4.2+) GNU

    mhrs
    mhrs 2006/06/07
  • Ruby Refactoring Browser

    はじめに Ruby Refactoring Browserは、 Rubyスクリプトのリファクタリングを支援するソフトウェアです。 リファクタリングとは、 「ソースコードの動作を変えずに、内部構造をより良いものに修正すること」です。 Ruby Refactoring Browserは、メソッド名・変数名の変更や、コードのある部分をメソッドとして くくり出すなど、手動では間違いやすい機械的な作業を、 対象のメソッド名やクラスを指定するだけで自動的に行ってくれます。 動作概要 スクリーンショット 動作環境 Ruby Refactoring Browser体の動作にはruby1.8.x、 もしくはruby 1.6.x + ruby_shim が必要です。 また、emacs上から対話的に呼び出すためのインターフェース(elisp)が 附属しています。 Linux + ruby 1.6.7, 1.8

    mhrs
    mhrs 2006/06/07