Yesterday I finished the version of a Gazpacho small plugin and I was about to create a svn project in the central repository for that. I just have an XML file, a PNG image and a Python file. Well, I also have the compiled Python file (*.pyc)
As you may know, we don't want pyc or any other form of auto generated files in the repository. So, before importing my code I removed the pyc file.
Oops, Murphy used the fact that it was 8 o'clock in the night and I was pretty tired, to made me erase the actual .py file instead of the .pyc file. Magically, 238 lines of code dissapeared in front of me as I didn't have any other copy of that file. Now is where the laughs come up.
Fortunately I had heard of python decompilers so I started looking on the net and then asked Johan. The program I was looking was decompyle. apt-get install decompyle and see what happens.
It didn't work because the decompyle program of this Debian (Ubuntu) installation was too old and didn't know how to handle python 2.3 bytecode format.
So, back to the net and look for the last version. Wooho, I found it and it says it can handle 2.3 format. So, where is the freaking download button? Nowhere, this has gone commercial and you have to pay to get your files back :-(
Well, this is the free software world. Somebody writes a good software, people like it, people use it and he/she try to get some money from his work. Totally legal and right stuff.
Back to Johan, he told me there is a fork on this software to keep it free (as in beer). God blesses forks (and free software to allow them). But this time it was no easy to find it, since all the google links points towards the commercial page. Finally I found it here: http://mirrors.wamug.org.au/ubuntu/pool/universe/d/decompyle/
This time it works properly and I got my file back :-)
The day of the living exception