我一直在尝试修改Geany中的默认Python编译器/运行命令。
一些搜索表明,我需要修改`/usr/share/geany/filetypes
#compiler=python -m py_compile "%f"
#run_cmd=python "%f"
compiler=python3 -c "import py_compile; py_compile.compile('%f')"
run_cmd=python3 "%f"
然而,在重新启动Geany之后,Build -> Set Build Commands
仍然显示旧命令,并且试图运行py3脚本会导致错误。
如上所述,在
Build->Set Build Commands
菜单的“python”末尾添加“3”。在Python命令下,您应该看到:
在此处将“3”添加到python的末尾
首先:不要更改这样的全局配置,因为这将更改所有系统用户的默认行为,并可能导致混乱。
文件
/usr/share/geany/filetypes.python
中的更改将在~/.config/geany/filedefs/filetypes.python
在家庭中所做的更改中被覆盖。当使用菜单
Build->Set Build Commands
时,它也会保存在那里。实际上,不需要手动更新文件,而是通过菜单。这也将有优势,改变将是可见的,而不重新启动Geany。相关问题 更多 >
编程相关推荐