Created
June 14, 2015 23:54
-
-
Save aconz2/ddf2d91f62a252166bf3 to your computer and use it in GitHub Desktop.
Retreive a list of all available packages from pip. (pip(1) doesn't output in a nice format)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import pip | |
searcher = pip.commands.SearchCommand() | |
options, _ = searcher.parse_args([]) | |
hits = searcher.search('*', options) | |
hits_transformed = pip.commands.search.transform_hits(hits) | |
for hit in hits_transformed: | |
print(hit['name']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment