艰难的道路
以root权限运行以下命令:
find /your/path/ -type f -name "*.py" -exec chmod u+x {} ;注意:
chmod如果您是
.py文件的所有者,则无需以root用户身份运行。
聪明的方法
编写脚本来解决这个问题。
#!/bin/bashif [ -f "$1" ]thengeany "$1" # You could also use xdg-open if you set geany to open .py fileselsecp /path/to/python/startup/template "$1" # You may omit this if you don't have a default templatechmod u+x "$1"geany "$1"fi
将脚本另存为,
pycreator例如
/usr/bin/,然后说
chown root:root /usr/bin/pycreatorchmod +x-w /usr/bin/pycreator
要使用创建新脚本
pycreator,请执行
pycreator calculator.py
@choroba在其评论中指向的[this]答案也提供了有关这方面的宝贵见解。



