(self, helpfile)
return display_extra_help
Create a callback with the helpfile value frozen at definition time
Create a callback with the helpfile value frozen at definition time
Create a callback with the helpfile value frozen at definition time
def __extra_help_callback(self, helpfile):
        "Create a callback with the helpfile value frozen at definition time"
        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 OSError as why:
                    messagebox.showerror(title='Document Start Failure',
                        message=str(why), parent=self.text)
            else:
                webbrowser.open(helpfile)
        return display_extra_help
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 OSError as why : messagebox . showerror ( title = 'Document Start Failure' , message = str ( why ) , parent = self . text ) else : webbrowser . open ( helpfile ) return display_extra_help