Python distutils.util() Examples

The following are 3 code examples of distutils.util(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module distutils , or try the search function .
Example #1
Source File: stubs_test.py    From browserscope with Apache License 2.0 5 votes vote down vote up
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') 
Example #2
Source File: stubs_test.py    From python-compat-runtime with Apache License 2.0 5 votes vote down vote up
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') 
Example #3
Source File: settings.py    From biggraphite with Apache License 2.0 5 votes vote down vote up
def strtobool(value):
    """Cast a string to a bool."""
    if value is None:
        return None
    if type(value) is bool:
        return value
    return distutils.util.strtobool(value)