Update example.py and fix __init__.py bugs

1.Update the example.py.cancel the global variable .
2.fix __init__.py bugs.Most is the exception problem.If the code did not catch the exception,the code will halt.
3.Add xml ,html,pdf report download.