psutil - getting process name is blank
Question: I'm trying to run this code and I'm not getting the list of processes by name:

    
    
    import psutil
    
    PROCNAME = "python.exe"
    
    for proc in psutil.process_iter():
        if proc.name == PROCNAME:
            print proc
    

What I get is nothing even though the process is running.


Answer: I was experiencing the same problem. Changing `proc.name` to `proc.name()`
solved it for me if anyone else was having similar issues.

