Google has a Python tutorial, and they describe boilerplate code as \"unfortunate\" and provide this example:
#!/usr/bin/python
# import modules used here -- sy
1) main boilerplate is common, but cannot be any simpler
2) main()
is not called without the boilerplate
3) the boilerplate allows module usage both as a standalone script, and as a library in other programs
4) it’s very common. doctest
is another one.
Train to become a Python guru…and good luck with the thesis! ;-)