Dan*_*ker 17 python nautilus scripts
我想用 Python 编写一个 Nautilus 脚本。那可能吗?如果可能,我该怎么做?
dv3*_*0ea 20
Nautilus 脚本可以用任何编程语言编写,包括 Python。您只需要使您的 python 源文件可执行并将其复制~/.gnome2/nautilus-scripts
到 14.04 之前的 Ubuntu 版本中。对于 Ubuntu 14.04 及更新版本,目录不同:~/.local/share/nautilus/scripts
您还需要添加#!/usr/bin/env python
为文件的第一行。请注意,默认情况下#!/usr/bin/env python
指向 Python2。如果您特别需要 Python 3,请使用#!/usr/bin/env python3
.
完成所有这些操作后,即可从scripts
Nautilus 中右键单击菜单的子菜单访问该脚本。
另见:https : //help.ubuntu.com/community/NautilusScriptsHowto
Nautilus 扩展比脚本具有更大的灵活性 - 例如。它们可用于将项目直接添加到上下文菜单。有可用的 python 绑定(python-nautilus)。
归档时间: |
|
查看次数: |
4801 次 |
最近记录: |