<s> import sys <EOL> PLATFORM_WINDOWS = '<STR_LIT>' <EOL> PLATFORM_LINUX = '<STR_LIT>' <EOL> PLATFORM_BSD = '<STR_LIT>' <EOL> PLATFORM_DARWIN = '<STR_LIT>' <EOL> PLATFORM_UNKNOWN = '<STR_LIT>' <EOL> def get_platform_name ( ) : <EOL> if sys . platform . startswith ( "<STR_LIT>" ) : <EOL> return PLATFORM_WINDOWS <EOL> elif sys . platform . startswith ( '<STR_LIT>' ) : <EOL> return PLATFORM_DARWIN <EOL> elif sys . platform . startswith ( '<STR_LIT>' ) : <EOL> return PLATFORM_LINUX <EOL> elif sys . platform . startswith ( '<STR_LIT>' ) : <EOL> return PLATFORM_BSD <EOL> else : <EOL> return PLATFORM_UNKNOWN <EOL> __platform__ = get_platform_name ( ) <EOL> def is_linux ( ) : <EOL> return __platform__ == PLATFORM_LINUX <EOL> def is_bsd ( ) : <EOL> return __platform__ == PLATFORM_BSD <EOL> def is_darwin ( ) : <EOL> return __platform__ == PLATFORM_DARWIN <EOL> def is_windows ( ) : <EOL> return __platform__ == PLATFORM_WINDOWS </s>
