filegui
index
filegui.py

Step by step sample for building an interface that displays a list
of files in the specified directory, and displays the contents of the
file in the lower portion of the window ('non-object-oriented' version).

 
Modules
            
Tkinter
os
tkinterGui

 
Functions
            
_bindEvents()
Binds mouse and keyboard events to respond to gui events
_buildCWDFrame(topLevel)
Builds the current working directory frame at top of GUI
_buildListFrame(topLevel)
create the frame that contains list of files and text entry
_buildTextDisplay(unused)
NOTE: decided to do the object-oriented version at this point,
so no real impl for the display functionality in this module
_setCWD(cwd)
Updates the user interface with specified current working directory
_setDirectory(*unused)
Event callback connected to GoTo button and text entry at top of gui
_setEntries()
Sets the names of the files and directories in the lists
_showDirectory(*unused)
Event callback connected to the directories list item selection
buildGui(topLevel)
Main function that organizes how the GUI is built
main()
Sample use of Tkinter to build a graphical user interface

 
Data
             ACTIVE = 'active'
ALL = 'all'
ANCHOR = 'anchor'
ARC = 'arc'
BASELINE = 'baseline'
BEVEL = 'bevel'
BOTH = 'both'
BOTTOM = 'bottom'
BROWSE = 'browse'
BUTT = 'butt'
CASCADE = 'cascade'
CENTER = 'center'
CHAR = 'char'
CHECKBUTTON = 'checkbutton'
CHORD = 'chord'
COMMAND = 'command'
CURRENT = 'current'
DISABLED = 'disabled'
E = 'e'
END = 'end'
EW = 'ew'
EXTENDED = 'extended'
FALSE = 0
FIRST = 'first'
FLAT = 'flat'
GROOVE = 'groove'
HORIZONTAL = 'horizontal'
INSERT = 'insert'
INSIDE = 'inside'
LAST = 'last'
LEFT = 'left'
MITER = 'miter'
MOVETO = 'moveto'
MULTIPLE = 'multiple'
N = 'n'
NE = 'ne'
NO = 0
NONE = 'none'
NORMAL = 'normal'
NS = 'ns'
NSEW = 'nsew'
NUMERIC = 'numeric'
NW = 'nw'
OFF = 0
ON = 1
OUTSIDE = 'outside'
PAGES = 'pages'
PIESLICE = 'pieslice'
PROJECTING = 'projecting'
RADIOBUTTON = 'radiobutton'
RAISED = 'raised'
RIDGE = 'ridge'
RIGHT = 'right'
ROUND = 'round'
S = 's'
SCROLL = 'scroll'
SE = 'se'
SEL = 'sel'
SEL_FIRST = 'sel.first'
SEL_LAST = 'sel.last'
SEPARATOR = 'separator'
SINGLE = 'single'
SOLID = 'solid'
SUNKEN = 'sunken'
SW = 'sw'
TOP = 'top'
TRUE = 1
UNITS = 'units'
VERTICAL = 'vertical'
W = 'w'
WORD = 'word'
X = 'x'
Y = 'y'
YES = 1
__file__ = r'http://www.metaslash.com/brochure/tutorial/filegui.pyc'
__name__ = 'filegui'
_dirList = None
_fileList = None
_gotoEntry = None
_selectedDirectory = None