Any more thought on Python execution?

Product: PowerShell Universal
Version: 4.0.12

Saw some discussions in the past… been awhile, about the possibility of some form of Python execution support. Is that still a possibility in the future? Thinking largely script Automation. While we are very heavy users of PS in our environment, we are starting to utilize Python for ML and such… would be nice to not have to rely on Windows tasks for scheduling. I played with Snek and was able to kinda get it to work with the newer releases of Python… kinda… but Python isn’t really my realm…


If you just want this for automation/scheduling, could you just have a PS1 file launch the python executable and the python file. Something as simple as:


If you need to pass arguments or capture output back to PSU then this probably would require a lot more involvement. For just task scheduling and launching a Python script it might be enough.

I suspect its a little more complicated then that @OtherPeoplesCode .

In theory that could work but is a lot of manual work if you use containers, Linux, or when you upgrade.

Python versions, environments, management, and the way it works Apps will need to be aligned with PSU releases so all dependencies are supported. There will also need to be thought into how python modules are stored and loaded.

Personally, I look forward to being able to use Selenium on Python, on PSU if we get Python support.

We haven’t made progress on this front specifically but are working to make the platform more modular to support stuff like this. Abstracting the script execution is on the list of extensible points but not something we are actively working on.

I do appreciate the potential hurdles that complex python scripts could impose, but I have some scripts that do successfully run python scripts by just calling py and the script name. That being said they are API calls to other systems that are capable of taking that call. I just didn’t want to write my own wrapper that Cisco already created.

1 Like