A Fire Upon the Deep
![]() |
|
![]() |
|
![]() |
|
Interesting thing about writing a post every day: I didn't get blocked yet. Sure, this is only the 9th post, but considering my previous post-a-month cadence, and that I would just have nothing to write about, it's clear to me that writing leads to writing.
That is perhaps the most obvious thing that not everyone notices: the way to do things is to do things. The way to write free software is to write software that is free. To go to Alaska you have to go. To Alaska. To write, you have to write. To do music, you have to do music. To make bread, you have to make bread.
Will every piece of bread you make be good? Will everything you write be good? Will you get to Alaska? No. You will fail.
But if you don't do failed crap first, then there is no way to do anything decent later. I think it was Amadeo Carrizo (famous, old, goalkeeper) who said about a (not so famous, young, goalkeeper) "He's not bad, but he needs to be scored on a few hundred times more before he's good".
I have a long history of failure. I have a short story of successes. I am working on it.
Of all the corpses of my projects, there is one thatI feel worse about, which is rst2pdf. I feel bad about abandnoning several, but rst2pdf was actually a useful tool, used by a bunch of people, and that it has never gathered enough momentum with other developers is sad.
So, I will pick it up. I will spend about 4 hours a week on it. The plan is to:
Gather some patches that are lingering on the issue tracker
Fix some simple-ish bugs
Make another release with 1) and 2)
And of course:
Not let it fall in disrepair again
In the meantime, here is a nice thing I just heard about. Dimitri Christodoulou has hacked rst2pdf so that it can handle the raw:: html
directive.
This, dear friends is completely nuts, absolutely out of scope for any given docutils tool, and just too cool :-)
I will try to hijack his code (proper credit and so on), and incorporate it into rst2pdf.
And Dimitri, or anyone else who wants to do cool stuff with rst2pdf: let me know! I will give you commit rights immediately!
This comes from this thread in the Python Argentina mailing list (which I strongly recommend if you read spanish).
I was the other day trying to do shell-script-like-things on python (as part of a monster setup.py) and I was annoyed that in shell it's easy to do this:
Or this:
Or this:
And on Python I had to do this, which is verbose and ugly:
This is what I wanted to have:
And of course, you can't do that. So, I asked, how do you implement that context manager? I got several answers.
That's available in Fabric:
It's not hard to do:
It's even easier to do:
That's cool, so let's add it to path.py
Maybe check for exceptions
All in all, I learned how to do context managers, about contextlib, about fabric and about path.py. Which is not bad for 15 minutes :-)