miedaの備忘録

わすれないように

sublime text 3 で python3を使ったビルドをする

Python3でのビルド環境を追加する。
tools -> Build System -> New Build System ...
から

{
	"shell_cmd": "python3 -u $file",
	"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
	"selector": "source.python"
}

をPython3.sublime-buildで保存する。

PYTHONPATHも独自設定が必要な様子なので
preference -> Setting - User に以下を追記

    "build_env":
    {
        "PYTHONPATH": "/usr/local/lib/python3.4/site-packages"
    }