当前位置: 首页>>代码示例>>Python>>正文


Python win32api.GetVersionEx方法代码示例

本文整理汇总了Python中win32api.GetVersionEx方法的典型用法代码示例。如果您正苦于以下问题:Python win32api.GetVersionEx方法的具体用法?Python win32api.GetVersionEx怎么用?Python win32api.GetVersionEx使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在win32api的用法示例。


在下文中一共展示了win32api.GetVersionEx方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: InitInstance

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import GetVersionEx [as 别名]
def InitInstance(self):
		" Called to crank up the app "
		numMRU = win32ui.GetProfileVal("Settings","Recent File List Size", 10)
		win32ui.LoadStdProfileSettings(numMRU)
#		self._obj_.InitMDIInstance()
		if win32api.GetVersionEx()[0]<4:
			win32ui.SetDialogBkColor()
			win32ui.Enable3dControls()

		# install a "callback caller" - a manager for the callbacks
#		self.oldCallbackCaller = win32ui.InstallCallbackCaller(self.CallbackManager)
		self.LoadMainFrame()
		self.SetApplicationPaths() 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:15,代码来源:app.py

示例2: get_platform

# 需要导入模块: import win32api [as 别名]
# 或者: from win32api import GetVersionEx [as 别名]
def get_platform():
    global os 
    rv = OSInfo()
    rv.platform = sys.platform
    if sys.platform.startswith("linux"):
        import os # making this global breaks on IronPython
        osname, _, kernel, _, arch = os.uname()
        rv.arch = arch
        rv.osname = osname
        rv.osversion = kernel
        rv.distribution, rv.release = _get_linux_dist()
    elif sys.platform.startswith("darwin"):
        import os # making this global breaks on IronPython
        osname, _, kernel, _, arch = os.uname()
        rv.arch = arch
        rv.osname = osname
        rv.osversion = kernel
        rv.distribution, rv.release = _get_darwin_dist()
    elif sys.platform in ("win32", "cli"):
        import os
        rv.arch = os.environ["PROCESSOR_ARCHITECTURE"]
        rv.osname = os.environ["OS"]
        rv.distribution = "Microsoft"
        if sys.platform == "win32":
            import win32api
            major, minor, build, api, extra = win32api.GetVersionEx()
            rv.osversion = "%d.%d.%d-%s" % (major, minor, build, extra)
            rv.release = "Unknown"
        elif sys.platform == "cli":
            rv.osversion = "Unknown"
            rv.release = "Unknown"
    return rv 
开发者ID:kdart,项目名称:pycopia,代码行数:34,代码来源:platutils.py


注:本文中的win32api.GetVersionEx方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。