home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / dist-packages / AppInstall / distros / __init__.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-10-12  |  1.0 KB  |  35 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from Ubuntu import Distribution
  5.  
  6. def get_distro():
  7.     '''
  8.     Returns a distribution class instance that contains information and methods
  9.     corresponding to the used distribution
  10.     '''
  11.     distro = Distribution()
  12.     return distro
  13.  
  14.  
  15. def get_lsb_info():
  16.     '''
  17.     Returns the LSB information in a tuple:
  18.      - ID
  19.      - Codename
  20.      - Description
  21.      - Release
  22.     '''
  23.     lsb_info = ()
  24.     for lsb_option in [
  25.         '-i',
  26.         '-c',
  27.         '-d',
  28.         '-r']:
  29.         pipe = os.popen('lsb_release %s -s' % lsb_option)
  30.         lsb_info.append(pipe.read().strip())
  31.         del pipe
  32.     
  33.     return lsb_info
  34.  
  35.