Correct the shebangs to !/usr/bin/env python2.7

Since we require Python 2.7, we need to tell the Python interpreter so.
This will cause any confusion and it will hopefully make packager's life
easier. Also, we need to use the /usr/bin/env, because we can not assume
that Python will be available at /usr/bin/python. A very good answer at
SO:

    http://stackoverflow.com/a/19305076/1105870

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Import print_function from __future__

This uses the new py3k print syntax. Since we are already requiring
Python 2.7, it is safe to assume that this will be always available to
us. Also, this makes any future porting to py3k efforts easier.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Use != instead of <>

There were a few places where an old and deprecated syntax was used.
This commit replaces it all.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Remove usage of has_key() method

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Add gitignore and ignore Python specific files

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Correct a tab into spaces

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Import py3k like division from the __future__

And also simplify the syntax to raise to a power instead of just
multiplying. I think this is less error prone.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>