mirror of https://github.com/flaggo/pydu.git
add docstring for process.get_processes_by_path
This commit is contained in:
parent
b1d27fd122
commit
f699b13945
|
@ -5,6 +5,9 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
def get_processes_by_path(path):
|
def get_processes_by_path(path):
|
||||||
|
"""
|
||||||
|
Get processes which are running on given path or sub path of given path.
|
||||||
|
"""
|
||||||
pinfos = []
|
pinfos = []
|
||||||
for proc in psutil.process_iter():
|
for proc in psutil.process_iter():
|
||||||
pinfo = proc.as_dict(attrs=['pid', 'name', 'exe', 'cwd', 'open_files'])
|
pinfo = proc.as_dict(attrs=['pid', 'name', 'exe', 'cwd', 'open_files'])
|
||||||
|
|
Loading…
Reference in New Issue