(cls)
return ostyp
Check the OS we are in
Check the OS we are in
Check the OS we are in
def checkOSType(cls):
        """Check the OS we are in"""

        ostyp=''
        var_s=['OSTYPE','OS']
        for var in var_s:
            if var in os.environ:
                try:
                    ostyp = str.lower(os.environ[var])
                except:
                    ostyp = os.environ[var].lower()

        ostyp=ostyp.lower()
        if ostyp.find('windows')!=-1:
            ostyp='windows'
        elif ostyp.find('darwin')!=-1 or ostyp.find('apple')!=-1:
            ostyp='mac'
        elif ostyp.find('linux')!=-1:
            ostyp='linux'
        else:
            ostyp='unknown'
            try:
                info=os.uname()
            except:
                pass
            ostyp=info[0].lower()
            if ostyp.find('darwin')!=-1:
                ostyp='mac'
        return ostyp
def checkOSType ( cls ) : ostyp = '' var_s = [ 'OSTYPE' , 'OS' ] for var in var_s : if var in os . environ : try : ostyp = str . lower ( os . environ [ var ] ) except : ostyp = os . environ [ var ] . lower ( ) ostyp = ostyp . lower ( ) if ostyp . find ( 'windows' ) != - 1 : ostyp = 'windows' elif ostyp . find ( 'darwin' ) != - 1 or ostyp . find ( 'apple' ) != - 1 : ostyp = 'mac' elif ostyp . find ( 'linux' ) != - 1 : ostyp = 'linux' else : ostyp = 'unknown' try : info = os . uname ( ) except : pass ostyp = info [ 0 ] . lower ( ) if ostyp . find ( 'darwin' ) != - 1 : ostyp = 'mac' return ostyp