トップ 一覧 検索 ヘルプ RSS ログイン

PRG-PY_consoleの変更点

  • 追加された行はこのように表示されます。
  • 削除された行はこのように表示されます。
! コンソールがうるさい
Python から clear コマンドを実行すると"clear"がないと怒られた
(Windowsには無いよね)

 def clearConsole():
    import os 
    command = 'clear'
    if os.name in ('nt', 'dos'):  # If Machine is running on Windows, use cls
        command = 'cls'
    os.system(command)
 
 if __name__ == '__main__':
    clearConsole()