Lecture 10 - 3/29/11 ECE 364: Software Tools Laboratory...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
3/29/11 1 ECE 364: Software Tools Laboratory Lecture 10 April 4th, 2011 Lecturer: Michael Goldfarb 1 Lecture 10 § Introduction to Tk § Widgets § Events and Callbacks § Pack Geometry Manager § Examples and sample programs § ~ee364/examples/LEC-10 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3/29/11 2 Sample Programs § Most concepts will be demonstrated through example programs § These programs are broken into two areas: § 0_BARE_BONES has only that which is needed to accomplish a given task § All other files/directories use widgets coupled with additional fonts, cursors, colors, etc. to make the program interface more appealing (or appalling) 3 GUIs in Python § It would be very time consuming to write a GUI from scratch every time § We use a collection prewritten software libraries that handle the details of drawing to the screen § Usually called toolkits or frameworks § Most modern GUI toolkits provide the typical elements § Windows, buttons, textboxes, scrollbars, menus etc. 4
Background image of page 2
3/29/11 3 GUIs in Python § Common Python toolkits § Qt (Python module: PyQt4 ) § Gtk+ (Python module: gtk ) § wxWidgets (Python module: wx ) § Tk (Python module: Tkinter ) § The 'standard' Python GUI toolkit 5 Hello World #! /usr/bin/env python from Tkinter import * mainWindow = Tk() msg = Label(mainWindow, text= l Hello World z ) msg.pack() mainWindow.mainloop() 6
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/26/2011 for the course ECE 364 taught by Professor Niklaselmqvist during the Fall '10 term at Purdue University-West Lafayette.

Page1 / 11

Lecture 10 - 3/29/11 ECE 364: Software Tools Laboratory...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online