use*_*250 14 python geany python-3.x
我一直在尝试修改Geany中的默认Python编译器/运行命令.
有些搜索表明我需要修改`/usr/share/geany/filetypes.python的最后两行如下
#compiler=python -m py_compile "%f"
#run_cmd=python "%f"
compiler=python3 -c "import py_compile; py_compile.compile('%f')"
run_cmd=python3 "%f"
Run Code Online (Sandbox Code Playgroud)
然而,在重新启动Geany之后,Build -> Set Build Commands仍然会显示旧命令并尝试运行py3脚本会导致错误.
sus*_*ams 25
Build->Set Build Commands如上所述,在菜单上的"python"末尾添加"3" .
在Python命令下,您应该看到:
在这里添加' 3 '到python的末尾
frl*_*lan 13
首先:不要更改这样的全局配置,因为这将改变所有系统用户的默认行为,并可能导致混淆.
/usr/share/geany/filetypes.python在您家中进行的更改中,文件内的更改将被覆盖~/.config/geany/filedefs/filetypes.python.
使用菜单时,Build->Set Build Commands它也会保存在那里.实际上,无需手动更新文件,而是通过菜单更新.这也将具有优势,无需重新启动Geany即可看到更改.