Pregunta

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?

¿Fue útil?

Solución

You can do it like this :)

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

Otros consejos

I don't know how to directly call a python function from Gnomeshell, but there is an alternative way. As gnomeshell is programmed with Javascript you could use a python to javascript compiler to translate the python functions you need.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top