bufsize.py: make script compatible with Python 3.x
histman.py: make script compatible with Python 3.x
purgelogs.py: make script compatible with Python 3.x
quick_force_color.py: make script compatible with Python 3.x
server_autoswitch.py: make script compatible with Python 3.x
text_item.py: make script compatible with Python 3.x