parameters: (self)
return_statement: return "yes", ""
docstring: Test wheter the package is installed.
  
          Returns two values: a status indicator which is one of
          "yes", "no", "old" (an older version is installed) or "bad"
          (something went wrong during the install test) and a human
          readable string which may contain more details.
docstring_summary: Test wheter the package is installed.
docstring_tokens: Test wheter the package is installed .
function: def installed(self):
          """Test wheter the package is installed.
  
          Returns two values: a status indicator which is one of
          "yes", "no", "old" (an older version is installed) or "bad"
          (something went wrong during the install test) and a human
          readable string which may contain more details."""
  
          namespace = {
              "NotInstalled": _scriptExc_NotInstalled,
              "OldInstalled": _scriptExc_OldInstalled,
              "BadInstalled": _scriptExc_BadInstalled,
              "os": os,
              "sys": sys,
              }
          installTest = self._dict['Install-test'].strip() + '\n'
          try:
              exec installTest in namespace
          except ImportError, arg:
              return "no", str(arg)
          except _scriptExc_NotInstalled, arg:
              return "no", str(arg)
          except _scriptExc_OldInstalled, arg:
              return "old", str(arg)
          except _scriptExc_BadInstalled, arg:
              return "bad", str(arg)
          except:
              sys.stderr.write("-------------------------------------\n")
              sys.stderr.write("---- %s: install test got exception\n" % self.fullname())
              sys.stderr.write("---- source:\n")
              sys.stderr.write(installTest)
              sys.stderr.write("---- exception:\n")
              import traceback
              traceback.print_exc(file=sys.stderr)
              if self._db._maintainer:
                  sys.stderr.write("---- Please copy this and mail to %s\n" % self._db._maintainer)
              sys.stderr.write("-------------------------------------\n")
              return "bad", "Package install test got exception"
          return "yes", ""
function_tokens: def installed ( self ) : namespace = { "NotInstalled" : _scriptExc_NotInstalled , "OldInstalled" : _scriptExc_OldInstalled , "BadInstalled" : _scriptExc_BadInstalled , "os" : os , "sys" : sys , } installTest = self . _dict [ 'Install-test' ] . strip ( ) + '\n' try : exec installTest in namespace except ImportError , arg : return "no" , str ( arg ) except _scriptExc_NotInstalled , arg : return "no" , str ( arg ) except _scriptExc_OldInstalled , arg : return "old" , str ( arg ) except _scriptExc_BadInstalled , arg : return "bad" , str ( arg ) except : sys . stderr . write ( "-------------------------------------\n" ) sys . stderr . write ( "---- %s: install test got exception\n" % self . fullname ( ) ) sys . stderr . write ( "---- source:\n" ) sys . stderr . write ( installTest ) sys . stderr . write ( "---- exception:\n" ) import traceback traceback . print_exc ( file = sys . stderr ) if self . _db . _maintainer : sys . stderr . write ( "---- Please copy this and mail to %s\n" % self . _db . _maintainer ) sys . stderr . write ( "-------------------------------------\n" ) return "bad" , "Package install test got exception" return "yes" , ""