parameters: (self)
return_statement: return name
docstring: The process name.
docstring_summary: The process name.
docstring_tokens: The process name .
function: def name(self):
          """The process name."""
          name = self._platform_impl.get_process_name()
          if os.name == 'posix':
              # On UNIX the name gets truncated to the first 15 characters.
              # If it matches the first part of the cmdline we return that
              # one instead because it's usually more explicative.
              # Examples are "gnome-keyring-d" vs. "gnome-keyring-daemon".
              try:
                  cmdline = self.cmdline
              except AccessDenied:
                  pass
              else:
                  if cmdline:
                      extended_name = os.path.basename(cmdline[0])
                      if extended_name.startswith(name):
                          name = extended_name
          # XXX - perhaps needs refactoring
          self._platform_impl._process_name = name
          return name
function_tokens: def name ( self ) : name = self . _platform_impl . get_process_name ( ) if os . name == 'posix' : # On UNIX the name gets truncated to the first 15 characters. # If it matches the first part of the cmdline we return that # one instead because it's usually more explicative. # Examples are "gnome-keyring-d" vs. "gnome-keyring-daemon". try : cmdline = self . cmdline except AccessDenied : pass else : if cmdline : extended_name = os . path . basename ( cmdline [ 0 ] ) if extended_name . startswith ( name ) : name = extended_name # XXX - perhaps needs refactoring self . _platform_impl . _process_name = name return name