Pythonization of some code files

Please read through this and see what changes you need to make to the other
files!  I would really appreciate that :smile:

This commit should NOT be merged into sugarlabs:master, as this should be
rebased into a more sensible overall commit scheme for the whole pull request.