<s> """<STR_LIT>""" <EOL> from Tkinter import * <EOL> import os <EOL> import os . path <EOL> import textView <EOL> import idlever <EOL> class AboutDialog ( Toplevel ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , parent , title ) : <EOL> Toplevel . __init__ ( self , parent ) <EOL> self . configure ( borderwidth = <NUM_LIT:5> ) <EOL> self . geometry ( "<STR_LIT>" % ( parent . winfo_rootx ( ) + <NUM_LIT:30> , <EOL> parent . winfo_rooty ( ) + <NUM_LIT:30> ) ) <EOL> self . bg = "<STR_LIT>" <EOL> self . fg = "<STR_LIT>" <EOL> self . CreateWidgets ( ) <EOL> self . resizable ( height = FALSE , width = FALSE ) <EOL> self . title ( title ) <EOL> self . transient ( parent ) <EOL> self . grab_set ( ) <EOL> self . protocol ( "<STR_LIT>" , self . Ok ) <EOL> self . parent = parent <EOL> self . buttonOk . focus_set ( ) <EOL> self . bind ( '<STR_LIT>' , self . Ok ) <EOL> self . bind ( '<STR_LIT>' , self . Ok ) <EOL> self . wait_window ( ) <EOL> def CreateWidgets ( self ) : <EOL> frameMain = Frame ( self , borderwidth = <NUM_LIT:2> , relief = SUNKEN ) <EOL> frameButtons = Frame ( self ) <EOL> frameButtons . pack ( side = BOTTOM , fill = X ) <EOL> frameMain . pack ( side = TOP , expand = TRUE , fill = BOTH ) <EOL> self . buttonOk = Button ( frameButtons , text = '<STR_LIT>' , <EOL> command = self . Ok ) <EOL> self . buttonOk . pack ( padx = <NUM_LIT:5> , pady = <NUM_LIT:5> ) <EOL> frameBg = Frame ( frameMain , bg = self . bg ) <EOL> frameBg . pack ( expand = TRUE , fill = BOTH ) <EOL> labelTitle = Label ( frameBg , text = '<STR_LIT>' , fg = self . fg , bg = self . bg , <EOL> font = ( '<STR_LIT>' , <NUM_LIT> , '<STR_LIT>' ) ) <EOL> labelTitle . grid ( row = <NUM_LIT:0> , column = <NUM_LIT:0> , sticky = W , padx = <NUM_LIT:10> , pady = <NUM_LIT:10> ) <EOL> byline = "<STR_LIT>" + <NUM_LIT:5> * '<STR_LIT:\n>' <EOL> labelDesc = Label ( frameBg , text = byline , justify = LEFT , <EOL> fg = self . fg , bg = self . bg ) <EOL> labelDesc . grid ( row = <NUM_LIT:2> , column = <NUM_LIT:0> , sticky = W , columnspan = <NUM_LIT:3> , padx = <NUM_LIT:10> , pady = <NUM_LIT:5> ) <EOL> labelEmail = Label ( frameBg , text = '<STR_LIT>' , <EOL> justify = LEFT , fg = self . fg , bg = self . bg ) <EOL> labelEmail . grid ( row = <NUM_LIT:6> , column = <NUM_LIT:0> , columnspan = <NUM_LIT:2> , <EOL> sticky = W , padx = <NUM_LIT:10> , pady = <NUM_LIT:0> ) <EOL> labelWWW = Label ( frameBg , text = '<STR_LIT>' , <EOL> justify = LEFT , fg = self . fg , bg = self . bg ) <EOL> labelWWW . grid ( row = <NUM_LIT:7> , column = <NUM_LIT:0> , columnspan = <NUM_LIT:2> , sticky = W , padx = <NUM_LIT:10> , pady = <NUM_LIT:0> ) <EOL> Frame ( frameBg , borderwidth = <NUM_LIT:1> , relief = SUNKEN , <EOL> height = <NUM_LIT:2> , bg = self . bg ) . grid ( row = <NUM_LIT:8> , column = <NUM_LIT:0> , sticky = EW , <EOL> columnspan = <NUM_LIT:3> , padx = <NUM_LIT:5> , pady = <NUM_LIT:5> ) <EOL> labelPythonVer = Label ( frameBg , text = '<STR_LIT>' + sys . version . split ( ) [ <NUM_LIT:0> ] , fg = self . fg , bg = self . bg ) <EOL> labelPythonVer . grid ( row = <NUM_LIT:9> , column = <NUM_LIT:0> , sticky = W , padx = <NUM_LIT:10> , pady = <NUM_LIT:0> ) <EOL> tkVer = repr ( TkVersion ) . split ( '<STR_LIT:.>' ) <EOL> tkVer [ len ( tkVer ) - <NUM_LIT:1> ] = str ( '<STR_LIT>' % ( float ( '<STR_LIT:.>' + tkVer [ len ( tkVer ) - <NUM_LIT:1> ] ) ) ) [ <NUM_LIT:2> : ] <EOL> if tkVer [ len ( tkVer ) - <NUM_LIT:1> ] == '<STR_LIT>' : <EOL> tkVer [ len ( tkVer ) - <NUM_LIT:1> ] = '<STR_LIT:0>' <EOL> tkVer = '<STR_LIT:.>' . join ( tkVer ) <EOL> labelTkVer = Label ( frameBg , text = '<STR_LIT>' + <EOL> tkVer , fg = self . fg , bg = self . bg ) <EOL> labelTkVer . grid ( row = <NUM_LIT:9> , column = <NUM_LIT:1> , sticky = W , padx = <NUM_LIT:2> , pady = <NUM_LIT:0> ) <EOL> py_button_f = Frame ( frameBg , bg = self . bg ) <EOL> py_button_f . grid ( row = <NUM_LIT:10> , column = <NUM_LIT:0> , columnspan = <NUM_LIT:2> , sticky = NSEW ) <EOL> buttonLicense = Button ( py_button_f , text = '<STR_LIT>' , width = <NUM_LIT:8> , <EOL> highlightbackground = self . bg , <EOL> command = self . ShowLicense ) <EOL> buttonLicense . pack ( side = LEFT , padx = <NUM_LIT:10> , pady = <NUM_LIT:10> ) <EOL> buttonCopyright = Button ( py_button_f , text = '<STR_LIT>' , width = <NUM_LIT:8> , <EOL> highlightbackground = self . bg , <EOL> command = self . ShowCopyright ) <EOL> buttonCopyright . pack ( side = LEFT , padx = <NUM_LIT:10> , pady = <NUM_LIT:10> ) <EOL> buttonCredits = Button ( py_button_f , text = '<STR_LIT>' , width = <NUM_LIT:8> , <EOL> highlightbackground = self . bg , <EOL> command = self . ShowPythonCredits ) <EOL> buttonCredits . pack ( side = LEFT , padx = <NUM_LIT:10> , pady = <NUM_LIT:10> ) <EOL> Frame ( frameBg , borderwidth = <NUM_LIT:1> , relief = SUNKEN , <EOL> height = <NUM_LIT:2> , bg = self . bg ) . grid ( row = <NUM_LIT:11> , column = <NUM_LIT:0> , sticky = EW , <EOL> columnspan = <NUM_LIT:3> , padx = <NUM_LIT:5> , pady = <NUM_LIT:5> ) <EOL> idle_v = Label ( frameBg , text = '<STR_LIT>' + idlever . IDLE_VERSION , <EOL> fg = self . fg , bg = self . bg ) <EOL> idle_v . grid ( row = <NUM_LIT:12> , column = <NUM_LIT:0> , sticky = W , padx = <NUM_LIT:10> , pady = <NUM_LIT:0> ) <EOL> idle_button_f = Frame ( frameBg , bg = self . bg ) <EOL> idle_button_f . grid ( row = <NUM_LIT> , column = <NUM_LIT:0> , columnspan = <NUM_LIT:3> , sticky = NSEW ) <EOL> idle_about_b = Button ( idle_button_f , text = '<STR_LIT>' , width = <NUM_LIT:8> , <EOL> highlightbackground = self . bg , <EOL> command = self . ShowIDLEAbout ) <EOL> idle_about_b . pack ( side = LEFT , padx = <NUM_LIT:10> , pady = <NUM_LIT:10> ) <EOL> idle_news_b = Button ( idle_button_f , text = '<STR_LIT>' , width = <NUM_LIT:8> , <EOL> highlightbackground = self . bg , <EOL> command = self . ShowIDLENEWS ) <EOL> idle_news_b . pack ( side = LEFT , padx = <NUM_LIT:10> , pady = <NUM_LIT:10> ) <EOL> idle_credits_b = Button ( idle_button_f , text = '<STR_LIT>' , width = <NUM_LIT:8> , <EOL> highlightbackground = self . bg , <EOL> command = self . ShowIDLECredits ) <EOL> idle_credits_b . pack ( side = LEFT , padx = <NUM_LIT:10> , pady = <NUM_LIT:10> ) <EOL> def ShowLicense ( self ) : <EOL> self . display_printer_text ( '<STR_LIT>' , license ) <EOL> def ShowCopyright ( self ) : <EOL> self . display_printer_text ( '<STR_LIT>' , copyright ) <EOL> def ShowPythonCredits ( self ) : <EOL> self . display_printer_text ( '<STR_LIT>' , credits ) <EOL> def ShowIDLECredits ( self ) : <EOL> self . display_file_text ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> def ShowIDLEAbout ( self ) : <EOL> self . display_file_text ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> def ShowIDLENEWS ( self ) : <EOL> self . display_file_text ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> def display_printer_text ( self , title , printer ) : <EOL> printer . _Printer__setup ( ) <EOL> text = '<STR_LIT:\n>' . join ( printer . _Printer__lines ) <EOL> textView . view_text ( self , title , text ) <EOL> def display_file_text ( self , title , filename , encoding = None ) : <EOL> fn = os . path . join ( os . path . abspath ( os . path . dirname ( __file__ ) ) , filename ) <EOL> textView . view_file ( self , title , fn , encoding ) <EOL> def Ok ( self , event = None ) : <EOL> self . destroy ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> root = Tk ( ) <EOL> def run ( ) : <EOL> import aboutDialog <EOL> aboutDialog . AboutDialog ( root , '<STR_LIT>' ) <EOL> Button ( root , text = '<STR_LIT>' , command = run ) . pack ( ) <EOL> root . mainloop ( ) </s>
