Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does `pip search` sort results?

Tags:

python

pip

I just searched

$ pip search latex
ftw.pdfgenerator          - A library for generating PDF representations of Plone objects with LaTeX.
chessproblem.ui           - The user interface to edit chessproblems for tex files using the chess-problem-diagrams latex style.
html2latex                - Convert HTML to latex.
latex2edx                 - Converter from latex to edX XML format course content files.
dot2tex                   - A Graphviz to LaTeX converter
Pweave                    - Scientific reports with embedded python computations with reST, LaTeX or markdown
PyLaTeX                   - A Python library for creating LaTeX files
collatex                  - CollateX is a collation tool.
preTeX                    - LaTeX preprocessor to simplify math typesetting
pyreport                  - Pyreport makes notes out of a python script. It can run the script in a sandbox and capture its output. It allows for embedding
                        RestructuredText or LaTeX comments in the code for literate programming and generates a report made of the literate comments, the code,
                        pretty printed, and the output of the script (pyreport can capture pylab figures). This is useful for documentations, making tutorials,
                        but also for sharing python-based calculations with colleagues.
latexrender               - A simple Flask app for rendering latex snippets into images.
pymcq                     - This is a project that integrates latex exam into pyhon for easier creating of mcq tests.
LaMark                    - A tool to embedding LaTeX in Markdown
maabara                   - Maabara allows you to compute and document error propagation fast and easy through Latex
elastictex                - Search with Latex
latexcodec                - A lexer and codec to work with LaTeX code in Python.
CiteBib                   - Generate a nice Bibtex or Latex bibliography according to the document content
latex2dnd                 - Generate edX drag-and-drop problems using compilation from latex
blockdiagcontrib-math     - LaTeX math plugin for blockdiag
markdown-include          - This is an extension to Python-Markdown which provides an "include" function, similar to that found in LaTeX (and also the C pre-processor
                        and Fortran). I originally wrote it for my FORD Fortran auto-documentation generator.
newtex                    - Create a new LaTeX document.
tex                       - Convert LaTeX or TeX source to PDF or DVI, and escape strings for LaTeX.
dvidraw                   - Drawing package with LaTeX-rendered text
latexpages                - Combine LaTeX docs into a single PDF
preprint                  - Tools for writing latex papers
dblatex                   - DocBook to LaTeX/ConTeXt Publishing
tex2pix                   - Lightweight renderer of LaTeX to a variety of graphics formats
latex2markdown            - An AMS-LaTeX compatible converter that maps a subset of LaTeX to Markdown/MathJaX.
PyTabular                 - Package for creating LateX tables.
hevea                     - Monitor and compile LaTeX files
latexmk.py                - Latexmk.py completely automates the process of generating a LaTeX document.
plasTeX                   - LaTeX document processing framework
mdtex                     - This is a script for study, use M-V-C design patterns in Latex writing,                 it also can convert a part of markdown syntax to
                        tex, but there are some bug in it
sffms                     - Sffms-style LaTeX output for Sphinx
rstex                     - An extension of docutils' rst2latex with inline math, equations, references, and raw latex
artist                    - A plotting library for Python with LaTeX output
wordtex                   - Latex to Word Press HTML converter
euganke-latex-importer    - euganke importer
paperweight               - Tools for hacking LaTeX documents
unicode_tex               - Convert between unicode characters and latex commands in Python.
bib2bbl                   - bibtex to bib items converter a utility for latex documents
markdown2latex            - Extension
py_apsrtable              - Provides functions to convert statistical results to LaTeX tables
md2latex                  - Simple markdown to LaTeX converter.
django-mathfield          - A Django model field for writing and displaying LaTeX
pytex                     - Command line utility to ease working on LaTeX documents.
yml2tex                   - yml2tex is a simple python script which generates LaTeX Beamer code out of YAML files.
moodle2edx                - Converter from latex to edX XML format course content files.
latexmake                 - Latexmake completely automates the process of generating a LaTeX document.
lax                       - A different way to write latex code.
tex-keywordprg            - Keyword program for LaTeX in Vim
django-latex              - Django application to generate latex/pdf files.
tidytex                   - Compile LaTeX with no auxiliary files
texeq                     - Generating LaTeX equations as images, with caching
LaTeXPy                   - constructing latex in python
draftcheck                - LaTeX Lint for Academic Writing
alttex                    - LaTeX pre-processor with support to templates, separate data sources, and alternatives.
scibook                   - SciBook -- extensible xsl transformer with LaTeX includes

As you can see from the first 3 results, it does not sort by

  • package name
  • package description

So how does pip sort? Can I change the sorting order?

like image 511
Martin Thoma Avatar asked Feb 21 '15 09:02

Martin Thoma


1 Answers

According to @padraic-cunningham, you can sort by package name by:

pip search latex | sort

or sort by description by:

pip search latex | sort -k3,3

These only work on POSIX systems like Linux or OS X.

like image 155
Rockallite Avatar answered Oct 08 '22 22:10

Rockallite