在调用self对象时,本类调用用Win32Info().collect()

import platform

class Test:
def test(self):
func = getattr(self,‘windows‘)
func()

@staticmethod
def windows():
from plugins.collect_windows_info import Win32Info
return Win32Info().collect() #在调用self对象时,本类调用用Win32Info().collect()
@staticmethod
def linux():
return ‘OK2‘
def test2(self):
return Test().test()




if __name__ == ‘__main__‘:
ob = Test()
op = ob.test2()

在调用self对象时,本类调用用Win32Info().collect()

上一篇:C# 请求数据 方式1


下一篇:linphone-sdk windows端VS编译心得