pgrep break windows
sottom opened this issue · comments
The pgrep
command used on the line at the link below breaks when run on Windows. The error is:
FileNotFoundError: [WinError 2] The system cannot find the file specified
Find a system agnostic way of doing it (using straight python perhaps).
Line 96 in 82655e3
Idea: see if flask-caching does anything similar...
This library looks like it might be a good option: https://github.com/giampaolo/psutil.
https://thispointer.com/python-get-list-of-all-running-processes-and-sort-by-highest-memory-usage/
same here
Traceback (most recent call last):
File "...\processors.py", line 9, in <module>
from mezmorize import Cache
File "C:\Users\...\AppData\Roaming\Python\Python37\site-packages\mezmorize\__init__.py", line 24, in <module>
from . import backends
File "C:\Users\...\AppData\Roaming\Python\Python37\site-packages\mezmorize\backends.py", line 22, in <module>
from .utils import (
File "C:\Users\...\AppData\Roaming\Python\Python37\site-packages\mezmorize\utils.py", line 101, in <module>
HAS_REDIS = redis and pgrep('redis')
File "C:\Users\...\AppData\Roaming\Python\Python37\site-packages\mezmorize\utils.py", line 96, in pgrep
return any_env or call(['pgrep', process]) == 0
File "C:\tools\Anaconda3\envs\ptpip\lib\subprocess.py", line 339, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\tools\Anaconda3\envs\ptpip\lib\subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "C:\tools\Anaconda3\envs\ptpip\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified