spacepaste

  1.  
  2. import time
  3. import datetime
  4. import MySQLdb
  5. from Tkinter import *
  6. class GridDemo( Frame ):
  7. def __init__( self ):
  8. Frame.__init__( self )
  9. self.master.title( "Grid Demo" )
  10. self.master.rowconfigure( 0, weight = 1 )
  11. self.master.columnconfigure( 0, weight = 1 )
  12. self.grid( sticky = W+E+N )
  13. self.head1 = Text( self, width = 30, height = 1, background = 'black', foreground = 'white', font='helvetica 14 bold' )
  14. self.head1.grid( row = 0, column = 0, sticky = E)
  15. self.head1.insert( INSERT, datetime.datetime.now() )
  16. self.rowconfigure( 1, weight = 1 )
  17. self.columnconfigure( 1, weight = 1 )
  18. def main():
  19. GridDemo().mainloop()
  20. if __name__ == "__main__":
  21. main()
  22.