(self)
Return process name, which on Windows is always the final
        part of the executable.
Return process name, which on Windows is always the final
        part of the executable.
Return process name which on Windows is always the final part of the executable .
def name(self):
        """Return process name, which on Windows is always the final
        part of the executable.
        """
        # This is how PIDs 0 and 4 are always represented in taskmgr
        # and process-hacker.
        if self.pid == 0:
            return "System Idle Process"
        elif self.pid == 4:
            return "System"
        else:
            try:
                # Note: this will fail with AD for most PIDs owned
                # by another user but it's faster.
                return py2_strencode(os.path.basename(self.exe()))
            except AccessDenied:
                return py2_strencode(cext.proc_name(self.pid))
def name ( self ) : # This is how PIDs 0 and 4 are always represented in taskmgr # and process-hacker. if self . pid == 0 : return "System Idle Process" elif self . pid == 4 : return "System" else : try : # Note: this will fail with AD for most PIDs owned # by another user but it's faster. return py2_strencode ( os . path . basename ( self . exe ( ) ) ) except AccessDenied : return py2_strencode ( cext . proc_name ( self . pid ) )