def is_ubuntu():
 if (sys.platform.startswith('linux') and osp.isfile('/etc/lsb-release')):
  release_info = open('/etc/lsb-release').read()
  if ('Ubuntu' in release_info):
   return True
  else:
   return False
 else:
  return False

def is_ubuntu ( ) : if ( sys . platform . startswith ( 'linux' ) and osp . isfile ( '/etc/lsb-release' ) ) : release_info = open ( '/etc/lsb-release' ) . read ( ) if ( 'Ubuntu' in release_info ) : return True else : return False else : return False
detect if we are running in an ubuntu-based distribution .