从Gnome Shell扩展中调用Python代码

Kam*_*mil 2 python gnome-shell

我在找了一段时间,但仍然找不到从GnomeShell扩展代码中调用python函数的任何书面方法。有可能这样做吗?

sim*_*mon 5

您可以这样做:)

const Util = imports.misc.util;
let python_script = '/path/to/python/script';
Util.spawnCommandLine("python " + python_script);
Run Code Online (Sandbox Code Playgroud)