There are some experimental bindings for Python in PixInsight but they haven't been kept up to date or made it to production quality, unfortunately. If I manage to retire perhaps I'll fix that. Having written a PI script or two in Javascript I'd rather not do that even again