Search code examples
pythongnome-shell

Calling Python code from Gnome Shell extension


I was looking for some time, but still can't find any documented way to call python functions from GnomeShell extension code. Is there any possibility to do that?


Solution

  • You can do it like this :)

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