But I cannot get the "Hello world!" sample to print out after running calibredb.
It just shows calibredb help message.

I've tried both in Linux and Windows, installed the calibre binary, download the source code with bzr, set the "CALIBRE_DEVELOP_FROM" variable to point to the "src" directory and modify the "src/calibre/__init__.py" with the print statement.

I cannot get the "Hello world!" sample to print out ...
I've tried both in Linux and Windows, installed the calibre binary, download the source code with bzr, set the "CALIBRE_DEVELOP_FROM" variable to point to the "src" directory and modify the "src/calibre/__init__.py" with the print statement.
Instructions look quite easy but I can't reproduce

I'll assume you have downloaded the source correctly. Run Calibre. It doesn't matter how you start it. Does the version number on the lower left of the GUI have an asterisk after it? It should be "0.7.47*" not "0.7.47." If it does have the asterisk, then you are running from source. If it doesn't, and I suspect it doesn't, then your "CALIBRE_DEVELOP_FROM" variable isn't pointing correctly.

Make sure the variable is correct (in Windows, just type "SET" at a command prompt to check.) It should point to the src folder that has a cherrypy folder inside it. Get that part working first.

I'll assume you have downloaded the source correctly. Run Calibre. It doesn't matter how you start it. Does the version number on the lower left of the GUI have an asterisk after it? It should be "0.7.47*" not "0.7.47." If it does have the asterisk, then you are running from source. If it doesn't, and I suspect it doesn't, then your "CALIBRE_DEVELOP_FROM" variable isn't pointing correctly.

Make sure the variable is correct (in Windows, just type "SET" at a command prompt to check.) It should point to the src folder that has a cherrypy folder inside it. Get that part working first.

No, it does not. It's the calibre package from the Ubuntu distro (0.7.18)
But the folder and variable looks OK

I don't know if it was because of the old version or something else but as you pointed I unistalled the calibre package, performed the manual install for calibre 0.7.47 and right after installation.

If the source you were running was current and the package was too old, then Calibre won't run from source. Every now and then Calibre introduces dependencies that only get installed with the full package.