macosx.py 文件源码

python
阅读 52 收藏 0 点赞 0 评论 0

项目:Projects 作者: it2school 项目源码 文件源码
def Video_AutoInit():
    """This is a function that's called from the c extension code
       just before the display module is initialized"""
    if MacOS and not MacOS.WMAvailable():
        if not sdlmain_osx.WMEnable():
            raise ImportError("Can not access the window manager.  Use py2app or execute with the pythonw script.")
    if not sdlmain_osx.RunningFromBundleWithNSApplication():
        try:
            default_icon_data = getResource('pygame_icon.tiff').read()
        except IOError:
            default_icon_data = None
        except NotImplementedError:
            default_icon_data = None

        sdlmain_osx.InstallNSApplication(default_icon_data)
    if (os.getcwd() == '/') and len(sys.argv) > 1:
        os.chdir(os.path.dirname(sys.argv[0]))
    return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号