Mageia Bugzilla – Attachment 10222 Details for
Bug 22983
python3 new security issues CVE-2018-1060, CVE-2018-1061, and CVE-2017-18207
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Helloworld program for Tkinter3
button.py (text/x-python), 912 bytes, created by
Len Lawrence
on 2018-06-03 17:11:13 CEST
(
hide
)
Description:
Helloworld program for Tkinter3
Filename:
MIME Type:
Creator:
Len Lawrence
Created:
2018-06-03 17:11:13 CEST
Size:
912 bytes
patch
obsolete
>#!/bin/env python3 >import tkinter as tk > >class Application( tk.Frame ): > def say_hi( self ): > print( "Captain Mageia speaking; All hands on deck." ) > > def createWidgets( self ): > self.QUIT = tk.Button( self ) > self.QUIT["text"] = "QUIT" > self.QUIT["fg"] = "red" > self.QUIT["command"] = self.quit > > self.QUIT.pack( {"side": "left"} ) > > self.hi_there = tk.Button( self ) > self.hi_there["text"] = "Hello", > self.hi_there["command"] = self.say_hi > > self.hi_there.pack( {"side": "left"} ) > > def __init__( self, master=None ): > tk.Frame.__init__( self, master ) > self.pack( ) > self.createWidgets( ) > >root = tk.Tk( ) ># Add for high definition screen but note that it does not change the ># sizes of built-in fonts. >root.tk.call( 'tk', 'scaling', 2.0 ) >app = Application( master=root ) >app.mainloop( ) >root.destroy( )
#!/bin/env python3 import tkinter as tk class Application( tk.Frame ): def say_hi( self ): print( "Captain Mageia speaking; All hands on deck." ) def createWidgets( self ): self.QUIT = tk.Button( self ) self.QUIT["text"] = "QUIT" self.QUIT["fg"] = "red" self.QUIT["command"] = self.quit self.QUIT.pack( {"side": "left"} ) self.hi_there = tk.Button( self ) self.hi_there["text"] = "Hello", self.hi_there["command"] = self.say_hi self.hi_there.pack( {"side": "left"} ) def __init__( self, master=None ): tk.Frame.__init__( self, master ) self.pack( ) self.createWidgets( ) root = tk.Tk( ) # Add for high definition screen but note that it does not change the # sizes of built-in fonts. root.tk.call( 'tk', 'scaling', 2.0 ) app = Application( master=root ) app.mainloop( ) root.destroy( )
View Attachment As Raw
Actions:
View
Attachments on
bug 22983
:
10219
|
10220
| 10222