def show(help_label=help_label, help_file=help_file): if 'https:' in help_file: try: import webbrowser webbrowser.open_new(help_file) #'https://docs.python.org/3.4/library/turtle.html' except: help_file += ' .. 但網路可能不通。' view_text(我.root, help_label, help_file)
def show(help_label=help_label, help_file=help_file): if 'https:' in help_file: try: import webbrowser webbrowser.open_new( help_file ) #'https://docs.python.org/3.4/library/turtle.html' except: help_file += ' .. 但網路可能不通。' view_text(我.root, help_label, help_file)
def display_printer_text(self, title, printer): printer._Printer__setup() text = '\n'.join(printer._Printer__lines) textView.view_text(self, title, text)
def showDemoHelp(): view_text(demo.root, "Help on turtledemo", __doc__)
def showAboutTurtle(): view_text(demo.root, "About the turtle module.", turtle.__doc__)
def showAboutDemo(): view_text(demo.root, "About turtledemo", about_turtledemo)
def test_view_text(self): # If modal True, tkinter will error with 'can't invoke "event" command' view = tv.view_text(root, 'Title', 'test text', modal=False) self.assertIsInstance(view, tv.TextViewer)
def test_view_text(self): # If modal True, tkinter will error with 'can't invoke "event" command' view = tv.view_text(self.root, "Title", "test text", modal=False) self.assertIsInstance(view, tv.TextViewer)
def test_view_text(self): # If modal True, get tk error 'can't invoke "event" command'. view = tv.view_text(root, 'Title', 'test text', modal=False) self.assertIsInstance(view, tv.TextViewer) view.Ok()
def test_view_text(self): # If modal True, get tkinter error 'can't invoke "event" command'. view = tv.view_text(self.root, 'Title', 'test text', modal=False) self.assertIsInstance(view, tv.TextViewer) view.Ok()
def show(help_label=help_label, help_file=help_file): view_text(self.root, help_label, help_file)