Python distutils 模块,util() 实例源码

我们从Python开源项目中,提取了以下2个代码示例,用于说明如何使用distutils.util()

项目:pymyra    作者:myralabs    | 项目源码 | 文件源码
def __init__(self, host, port, timeoutSeconds=180):
        self._mock_intent = distutils.util.strtobool(
            os.getenv("MYRA_MOCK_PREDICT_INTENT", "0"))
        if self._mock_intent:
            return
        self.host = host
        self.port = port
        self.session = requests.session()
        self.server = "http://%s:%s" % (host, port)
        self.timeoutSeconds = timeoutSeconds
项目:Deploy_XXNET_Server    作者:jzp820927    | 项目源码 | 文件源码
def setUp(self):
    super(StubsTest, self).setUp()
    self.platform = sys.platform
    self.mox = mox.Mox()
    self.mox.StubOutWithMock(locale, 'setlocale')
    self.mox.StubOutWithMock(util, 'get_platform')
    self.mox.StubOutWithMock(stubs.FakeFile, 'is_file_accessible')