C# 如何调用.NET';Python中的s ServiceBase.OnCustomCommand方法?
我有一个Windows服务(使用.NETC# 如何调用.NET';Python中的s ServiceBase.OnCustomCommand方法?,c#,python,.net,wcf,windows-services,C#,Python,.net,Wcf,Windows Services,我有一个Windows服务(使用.NET4.7.2,per中的C),它实现了ServiceBase.OnCustomCommand() 我有一个Python3.6脚本,需要调用OnCustomCommand方法。如何从Python调用OnCustomCommand 我看的地方 我看到Python已经实现了,但它似乎没有实现OnCustomCommand。我可能错了 我想出的最佳解决方案 从中可以看出,我可以使用sc控件。我目前的最佳解决方案是使用以下内容: import os os.syste
4.7.2
,per中的C),它实现了ServiceBase.OnCustomCommand
()
我有一个Python3.6
脚本,需要调用OnCustomCommand
方法。如何从Python调用OnCustomCommand
我看的地方 我看到Python已经实现了,但它似乎没有实现
OnCustomCommand
。我可能错了
我想出的最佳解决方案
从中可以看出,我可以使用sc控件
。我目前的最佳解决方案是使用以下内容:
import os
os.system('sc control MyService 42`)
提前感谢您的帮助