'Create a callback with the helpfile value frozen at definition time'

def __extra_help_callback(self, helpfile):

    def display_extra_help(helpfile=helpfile):
        if (not helpfile.startswith(('www', 'http'))):
            helpfile = os.path.normpath(helpfile)
        if (sys.platform[:3] == 'win'):
            try:
                os.startfile(helpfile)
            except WindowsError as why:
                tkMessageBox.showerror(title='Document    Start    Failure', message=str(why), parent=self.text)
        else:
            webbrowser.open(helpfile)
    return display_extra_help
