()
In here we try to determine the Linux distro we are currently running and
    then return the Package Management System commonly associated with that
    distro.
In here we try to determine the Linux distro we are currently running and
    then return the Package Management System commonly associated with that
    distro.
In here we try to determine the Linux distro we are currently running and then return the Package Management System commonly associated with that distro .
def get_pms():
    """In here we try to determine the Linux distro we are currently running and
    then return the Package Management System commonly associated with that
    distro."""
    if platform.system() != 'Linux': return False

    (distname,version,id) = platform.linux_distribution(full_distribution_name=False)
    if distname == 'gentoo':
        from noiselabs.box.pms.portage import Portage
        return Portage()
    elif distname in ['debian', 'ubuntu']:
        from noiselabs.box.pms.apt import APT
        return APT()
    elif distname in ['SuSE', 'fedora', 'redhat', 'centos', 'yellowdog', 'UnitedLinux', 'turbolinux']:
        from noiselabs.box.pms.yum import YUM
        return YUM()
    elif distname == 'slackware':
        from noiselabs.box.pms.slackpkg import Slackpkg
        return Slackpkg()
    elif distname == 'archlinux':
        from noiselabs.box.pms.pacman import Pacman
        return Pacman()
    else:
        return False
def get_pms ( ) : if platform . system ( ) != 'Linux' : return False ( distname , version , id ) = platform . linux_distribution ( full_distribution_name = False ) if distname == 'gentoo' : from noiselabs . box . pms . portage import Portage return Portage ( ) elif distname in [ 'debian' , 'ubuntu' ] : from noiselabs . box . pms . apt import APT return APT ( ) elif distname in [ 'SuSE' , 'fedora' , 'redhat' , 'centos' , 'yellowdog' , 'UnitedLinux' , 'turbolinux' ] : from noiselabs . box . pms . yum import YUM return YUM ( ) elif distname == 'slackware' : from noiselabs . box . pms . slackpkg import Slackpkg return Slackpkg ( ) elif distname == 'archlinux' : from noiselabs . box . pms . pacman import Pacman return Pacman ( ) else : return False