Catch IOError in _read_knobfile

Return empty dictionary instead in case the file does not exist.
Merge branch 'matching'
Use open() function instead of file()

Compatible between python2 and python3
Use python3 style print function

This is possible from python2.6 using the statement:

    from __future__ import print_function

For python versions below, the import statement will fail. The code will
run nevertheless if the line is removed. The only difference is, that
multiple arguments of the print() function will now be output as tuples.
Use python3 style division

Python3 division yields floating point results in all cases by default.
If you want to perform integer division, you need to use the '//'
operator.

In the modified file, the intended operation was a floating point
division anyway.
Use python3 style explicit relative imports

In python3 implicit relative imports are deprecated. Python2.5 supports
python3's explicit relative import syntax only using:

    from __future__ import absolute_import

From python2.6 the syntax is available without this statement.
Fix string compatibility issues

- in python3 there is only `str` instead of python2's: `basestring`,
  `unicode`, `str`
Fix pre-existing syntax issues
Fix dictionary compatibility issues

In python3, there is no has_keys() method for dicts anymore. Instead use
the syntax

    key in mydict

which is compatible to python2.

The preferred syntax for iterating over dictionaries is:

    for key in mydict:
        pass

Note that .keys() returns an iterable in python3. So it must be
converted to a list explicitly if desired:

    l = list(mydict.keys())
Fix metaclass compatibility issues
Fix binary issues

In python3 byte-arrays and strings are not implicit convertible anymore.
Fix reST syntax error
Use identity comparison operators (is, is not) for comparison to None

According to PEP8: "Comparisons to singletons like None should always be
done with is or is not, never the equality operators."

http://www.python.org/dev/peps/pep-0008/#programming-recommendations
automatic documentation works
for cython modules as well
(need to build first, but no need to install)
added an example showing how to use the madx module directly
PEP8: "Don't compare boolean values to True or False using ==."

In python booleans are singletons. Therefore to check whether an
variable holds a True/False boolean one needs the identity comparison
operators (is/is not). To check whether a variable evaluates to True/
False one should not use a comparison operator at all.
Add test/**/__init__.py files

This enables the test directories to be treated as packages and the
tests to be loaded as modules from the root directory:

/path/to/pymad$ python2 -m unittest test.cpymadtest.test_model_locator
Ignore more auto-generated files in src/ tree
Derive CpymadTest from object, instead of unittest.TestCase

For the unspecialized base class `CpymadTest`, it makes no sense to
execute the `test_xxx` methods defined herein. If derived from
`unittest.TestCase`, however, the `unittest` module can not distinguish
this class from a real test class and executes the `test_xxx` methods
anyway. This makes it impossible to execute the tests with a command
like:

    unittest -m test.cpymadtest.test_lhc
Add resource abstraction library

This is meant for easier and more uniform handling of different types of
resources. May they be couchdb documents, .egg package data or ordinary
file system entries.