Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
タブ補完時に表示されないように、readline履歴に記号を残さずにraw_inputを使用する方法はありますか?
次のような関数を作成できます
import readline def raw_input_no_history(): input = raw_input() readline.remove_history_item(readline.get_current_history_length()-1) return input
raw_input の代わりにその関数を呼び出します。呼び出す場所によっては、マイナス 1 は必要ない場合があります。