Python:在 Windows 主机内运行一个进程 [英] Python: run a process inside a windows host

查看:40
本文介绍了Python:在 Windows 主机内运行一个进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用 python 从 linux 主机在 windows 主机内运行一个进程.我看到了 WMI python 库,但似乎只能在 Windows 主机上工作,而不是在 linux 上,我该怎么办?我需要像 PSEXEC 这样的东西,但它只适用于 Windows.

I need to run a process inside a windows host from a linux host using python. I saw WMI python library but seems to work only from a windows host, not linux, how can I do? I neeed something like PSEXEC, but it works only for windows.

推荐答案

一个简单的解决方案是 在 windows 机器上运行 SSH 服务器 并使用 paramiko 库在客户端.

An easy solution is to run a SSH server on the windows box and use the paramiko library on the client side.

这篇关于Python:在 Windows 主机内运行一个进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆