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?
You can do it like this :)
const Util = imports.misc.util;
let python_script = '/path/to/python/script';
Util.spawnCommandLine("python " + python_script);