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


Python popen_spawn_win32.Popen方法代码示例

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


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

示例1: __init__

# 需要导入模块: from multiprocessing import popen_spawn_win32 [as 别名]
# 或者: from multiprocessing.popen_spawn_win32 import Popen [as 别名]
def __init__(self, *args, **kw):
            if hasattr(sys, 'frozen'):
                # We have to set original _MEIPASS2 value from sys._MEIPASS
                # to get --onefile mode working.
                os.putenv('_MEIPASS2', sys._MEIPASS)
            try:
                super(_Popen, self).__init__(*args, **kw)
            finally:
                if hasattr(sys, 'frozen'):
                    # On some platforms (e.g. AIX) 'os.unsetenv()' is not
                    # available. In those cases we cannot delete the variable
                    # but only set it to the empty string. The bootloader
                    # can handle this case.
                    if hasattr(os, 'unsetenv'):
                        os.unsetenv('_MEIPASS2')
                    else:
                        os.putenv('_MEIPASS2', '')

    # Second override 'Popen' class with our modified version. 
开发者ID:thsheep,项目名称:Python_Study,代码行数:21,代码来源:pyinstaller?????.py

示例2: __init__

# 需要导入模块: from multiprocessing import popen_spawn_win32 [as 别名]
# 或者: from multiprocessing.popen_spawn_win32 import Popen [as 别名]
def __init__(self, *args, **kw):
        if hasattr(sys, 'frozen'):
            # We have to set original _MEIPASS2 value from sys._MEIPASS
            # to get --onefile mode working.
            os.putenv('_MEIPASS2', sys._MEIPASS)
        try:
            super(_Popen, self).__init__(*args, **kw)
        finally:
            if hasattr(sys, 'frozen'):
                # On some platforms (e.g. AIX) 'os.unsetenv()' is not
                # available. In those cases we cannot delete the variable
                # but only set it to the empty string. The bootloader
                # can handle this case.
                if hasattr(os, 'unsetenv'):
                    os.unsetenv('_MEIPASS2')
                else:
                    os.putenv('_MEIPASS2', '')


# Second override 'Popen' class with our modified version. 
开发者ID:PaulKlinger,项目名称:Enhance-GoodReads-Export,代码行数:22,代码来源:enhance_goodreads_export_gui.py


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