How OpenStack Makes Python Better, and Vice-Versa
I’ve been a Python developer since the late 1990s and came to the OpenStack project from that long background within the rest of the community. Thierry Carrez is on the staff of the OpenStack Foundation and the chair of the OpenStack Technical Committee. He came to Python through OpenStack’s adoption of the language.
At EuroPython 2016, we delivered a presentation titled “How OpenStack Makes Python Better, and Vice-Versa”, discussing the history of the decision to use Python, our perspectives on how the two communities benefit each other, and how we can improve the relationship. The recording of the presentation, and the slides, are below.
enum – Enumeration Type — PyMOTW 3
sphinxcontrib-spelling 2.2.0
What’s new in 2.2.0? Use https with pypi.python.org package name checker (contributed by John-Scott Atlakson) Removed unnecessary shebang lines from non-script files (contributed by Avram Lubkin) Re-enable the PyEnchant dependency (contributed by Julian Berman)threading — Manage Concurrent Operations — PyMOTW 3
textwrap — Formatting Text Paragraphs — PyMOTW 3
Using Unicode with Sphinx, reStructuredText, and PDF Output
I’m working on updating my book, and besides actually writing the content one of the things I have to do is generate new LaTeX files to deliver to the publisher. I’ve written about my toolchain elsewhere, so I won’t repeat all of that information here. The short version is that I use Paver to drive Sphinx to convert reStructuredText input files to HTML for the website, LaTeX for the compositor at Pearson, and PDF for reviewers. Since the updated version covers Python 3, and one of the key benefits of Python 3 is better Unicode support, I want to include some characters outside of the normal ASCII set in my examples.
When you ask Sphinx’s latex builder to generate LaTeX output the result is a directory with a *.tex file containing your content and some other files with all of the parts you need to convert that LaTeX to other formats, including a Makefile with instructions for building PDF and DVI. By default that Makefile uses pdflatex to convert the *.tex output files it writes to PDF. My article for the random module includes an example of shuffling a card deck. The Python 2 version used letters to represent the card suits, but for Python 3 I switched to using Unicode symbols like what would appear on the cards. Making that work for HTML was easy, but the PDF output proved trickier.
shlex — Parse Shell-style Syntaxes — PyMOTW 3
sphinxcontrib-paverutils 1.13.0
What’s new in 1.13.0? provide a way to override the pdf generating command to support tools like xelatex instead of pdflatex for better unicode supportsphinxcontrib-paverutils 1.12.0
What’s new in 1.12.0? be explicit about how to lex the literal output to avoid issues with default language assumptions for inline literal blocks in Sphinx 1.4