Monday, October 31, 2011

[Py] The Python Challenge -- Level 05

Here is a note of my solution to solve Level 05 of The Python Challenge.

The main library used is the pickle.

Sunday, October 30, 2011

[Py] The Python Challenge -- Level 04

Here is a note of my solution to solve Level 04 of The Python Challenge.

The main library used is the urllib.parse to parse the url and the urllib.request for retrieving the web page source.

Thursday, October 27, 2011

[Py] The Python Challenge -- Level 03

Here is a note of my solution to solve Level 03 of The Python Challenge.

The main library used is the urllib.request for retrieving the web page source and the re for regular expression operations.

[Py] The Python Challenge -- Level 02

Here is a note of my solution to solve Level 02 of The Python Challenge.

The main library used is the urllib.request. In Python 2.x, it is just urllib.

Wednesday, October 26, 2011

[Py] The Python Challenge -- Level 01

Here is a note of my solution to solve Level 01 of The Python Challenge.

Used functions: ord() and chr().

Thursday, October 20, 2011

pss: searching your source code in command line

When I was working on my Ubuntu with Vim to write or to view source code, I had no simple way to find certain functions scattering in the files by their name or key words.

Now I have one useful tool which is named pss written by Eli Bendersky. The tool is written in Python and that is attractive to me, because I can read the source code and maybe learn something from it. :-)

Download: https://bitbucket.org/eliben/pss/downloads

Okular: Annotations are stored in local directory

This is just a quick note.

When using Okular to view the PDF files, you can add various annotations in the documents. These annotations, however, are not embedded in the PDF files. Instead, they are stored in your local directory. In my Ubuntu PC, the path is

~/.kde/share/apps/okular/docdata

The annotations are stored in individual XML files for the corresponding annotated PDF files.