'Check information about current operating system.
.. note:: This is a `classmethod`.
:return: system, hostname, path, encode, flag
* system(`str`): Operating system of current session.
* hostname(`str`): Hostname of current machine.
* path(`str`): Path to hosts on current operating system.
* encode(`str`): Default encoding of current OS.
* flag(`int`): A flag indicating whether the current OS is
supported or not.
flag  Status
1     supported
2     unsupported
:rtype: str, str, str, str, int'

@classmethod
def check_platform(cls):

    hostname = socket.gethostname()
    if (os.name == 'nt'):
        system = 'Windows'
        path = (os.getenv('WINDIR') + '\\System32\\drivers\\etc\\hosts')
        encode = 'win_ansi'
    elif (os.name == 'posix'):
        path = '/etc/hosts'
        encode = 'unix_utf8'
        if (sys.platform == 'darwin'):
            system = 'OS    X'
            hostname = hostname[0:(-6)]
        else:
            system = ['Unix', 'Linux'][sys.platform.startswith('linux')]
    else:
        return ('Unknown', '', '', 0)
    return (system, hostname, path, encode, 1)
