I'm afraid I'm being unfair, but I do think the op knows the answer and he's trying to achieve something else than a simple answer.
There are multiple ways to solve a problem. Judging by the question and the comments, he's looking for a solution that is different from what he already knows. In this specific case, I know I would like it if I could tell pip
to filter by regex instead of having to pass its output to grep
.
SO actually explicitly provides for OPs to post questions whose answer they already know. It is not meant only for low reputation users. When you post a question, you have an option to post an answer to it immediately. This possibility is there primarily for cases where someone had a problem that they solved while writing their question, or that they figured out without even initially thinking of SO but then realized that their solution would be useful to others.
Should a question like this be closed? if so, on which bases?
Not if you cannot point out one of the usual list of problems that make a question worthy of being closed. The presumed knowledge of the OP is not such a reason.
pip
provide a way to find packages by a regex? Or, should I just pipe the results ofdjango-
togrep
to filter out irrelevant packages?" -- then why do you think the OP knows the answer?