In 2019 Oliver began a series of dispatches on the Python language, a series he promised us for the start of the 2019 school year. Various hazards meant that this series could not be finished until June 2021.

And, as this forms a coherent whole and there was, from the start, the idea of ​​bringing them together, the result is one, in fact rather two epubs which compile the dispatches and their comments because the house refuses nothing. They are on a github repository with the cover images in svg and png versions. Ideally, they should be on a LinuxFr repository rather than this one.

You will obviously not escape the little workshop secrets at the end of the dispatch.


Thank you very much for starting

Thank you to everyone who contributed in one way or another to these dispatches, or who commented on them. This forms a valuable corpus that brings together both the didactic aspect and the experiences.

Special thanks to:

  • Oliver who started the series;

  • nokomprendo who is the main author of chapter 5 on Nix (and Guix);

  • and to Philippe F. who finished the series.

Without forgetting the remotivator, I named: tisaac.

The, or rather the electronic books

Topics covered

You will find the links at the bottom of the page, but a brief presentation is essential. So, we start with the popularity of Python (ideally I should have updated that, but hey), and then say goodbye to Python 2.

After these preliminaries, if I may say so, we approach the software in the form of tutorials Installation, Py Pyenv, Nix and Giux, Pip and Pipx, virtual environments and Pipenv. The dispatch on the code trainer is a feedback in the form of a two-way dialogue between Oliver and Philippe F.

And finally, to wrap things up nicely, there’s a series of interviews with language users. Each with a use, and therefore a different experience.

We thus have the compilation of the series of dispatches plus the comments. The comments were, however, not all taken up, not only by desire for censorship on my part, but was it necessary to keep a series of comments relating to a typo or completely off-topic? Which, in the end, makes very, very few comments less (including mine, by the way). On the other hand, all the avatars have gone by the wayside, that’s how it is1. I opted to add a “Comments” title, tagged <h2> and to insert rules (which I don’t see on my reader) between each block of comments to differentiate them. The tag <h2> allows you to go directly to the comments.

Besides, the only purely decorative images that have been kept are those of the chapter entries on which the book covers are based, by the way.

There is only one table of contents that brings them all together. I also deleted redundant information (license for example) or outdated (PyConFR from 2019).

The final result is certainly perfectible.

From ? Why two epub files?

On my eReader, the charts from the first Python Popularity Dispatch didn’t render at all and were unreadable. So I made two versions, identical, except that there is one that has the tables, like tables and the other for which they are in text, which transposes them in the other direction for a better readability. Classifications in column by year and in line for languages, it is good when it is about a table. For the text, it is better to have one line per year.

This way, it’s also more readable for people who can’t read with their eyes. And that seems extremely important to me.

Where is the license?

Oliver’s dispatches and commentary are CC0 licensed.’s default license is CC-BY-SA 4 (Attribution ― Share alike). The epubs are therefore under this last license, which seems to me a good compromise.

In the epub factory

The software used

To achieve the result, I used the extension for Firefox Save as eBook of which I had touched two words here in September 2020 and selected the text (dispatches plus comments) for each dispatch. This generated a basic epub file but not at all communicable as it is for several reasons in addition to the elements already given:

  • there was the LinuxFr “decoration”: notes, the relevant-useless couple, plus the “Discuss”, etc. which no longer had, from my point of view, any interest outside the site;
  • it was necessary to add the image files (which otherwise do not appear on the epub, or require a connection);
  • plus a few mistakes here and there (I don’t claim to have corrected everything).

Not to mention the titles of the chapters that needed to be homogenized. And finally, the generated file is not terribly well-formed apparently. So we had to use Sigil (great epub editor) to correct all that. And, of course, the afterword, the acknowledgments and the transposition of the tables into text were made from LibreOffice. The cover, meanwhile, was concocted with Inkscape.

Work in Sigil two three tricks

Little reminder and just in case: an epub file is actually a collection of text files, here one per chapter, images, styles, etc. All in very specific folders. So when you navigate in Sigil to edit an epub, you navigate by text file.

To be honest, I really got to know the epub editor with this work. The items below are just to give you an idea of ​​how I used it.

Sigil has detachable boxes, like Inkscape for example, I find it very practical with two screens. The principal with the file to work on, the Navigateur and the Prévisualisation in the other as well as the box Insérer un caractère spécial, very useful especially for non-breaking spaces. Indeed, you can’t use the keyboard for that, unless you write the html code. That said, having basic knowledge of html is quite useful, it saves time.

I very strongly suggest starting by opening theÉditeur de métadonnées (menu Outils or touch F8), by indicating the language (by default, for me it is English apparently), you can use the appropriate spelling correction module (if there is code, it is not necessarily very useful) and by take this opportunity to give a title to the document (dc:title), as well as to indicate the name of the author (dc:creator, here I put “Collective”, it’s better than unknown) and, possibly, the publisher (dc:publisher, here You can add more2. This metadata is really important.

You can use the search and replace functions either by file or for all files.

Reviewing the table of contents is also essential, if only to give it its name, for me it was “Table of Contents”, for a book in French, it doesn’t sound terrible. Note that when you generate it, you can select the retained levels.

For the images, you must start by adding them to the folder Images through the Navigateur and then we can insert them into the text file we are working on. And, it is also in the Navigateur that we reorganize the order of the chapters and we put the table of contents where we want (by default it is in second position, I moved it to the very end). Curiously, if Sigil accepts images in svg format for the illustrations, it refuses them for the cover.

And, obviously, the software is capable of fixing a not very correct epub file.

Transpose arrays

I imagine it’s possible to make a script for that, but I wouldn’t be able to. So the procedure I used, quicker to do than to describe:

  1. copy of the table from the dispatch;
  2. paste into Calc then copy this array again in Calc;
  3. still in Calc, collage transposed ;
  4. addition of additional columns where necessary, to add here the rank of the language, the tags (here <p>and </p> for each line but also <b> and </b> for highlighting), enter the first element of a column (for example the number with the flourishes for reading), select the cells of the column and make a Ctrl + D so that all that is copied downwards;
  5. copy and paste without format the table in Writer to turn it into text;
  6. copy the resulting text and paste it into Sigil.

The final question

Will there be others?

No !

On this good reading and good end of the year.

Go further

Leave a Reply