Add functions to allow script to work on Python 2.6
Don't double the size of varchars