FileDialog
index
/usr/lib/python2.1/lib-tk/FileDialog.py

File selection dialog classes.
 
Classes:
 
FileDialog
LoadFileDialog
SaveFileDialog

 
Modules
            
fnmatch
os
sys
_tkinter

 
Classes
            
FileDialog
LoadFileDialog
SaveFileDialog

 
class FileDialog
      Standard file selection dialog -- no checks on selected file.
 
Usage:
 
    d = FileDialog(master)
    file = d.go(dir_or_file, pattern, default, key)
    if file is None: ...canceled...
    else: ...open file...
 
All arguments to go() are optional.
 
The 'key' argument specifies a key in the global dictionary
'dialogstates', which keeps track of the values for the directory
and pattern arguments, overriding the values passed in (it does
not keep track of the default argument!).  If no key is specified,
the dialog keeps no memory of previous state.  Note that memory is
kept even when the dialog is canceled.  (All this emulates the
behavior of the Macintosh file selection dialogs.)
 
  
__init__(self, master, title=None)
cancel_command(self, event=None)
dirs_double_event(self, event)
dirs_select_event(self, event)
files_double_event(self, event)
files_select_event(self, event)
filter_command(self, event=None)
get_filter(self)
get_selection(self)
go(self, dir_or_file='.', pattern='*', default='', key=None)
ok_command(self)
ok_event(self, event)
quit(self, how=None)
set_filter(self, dir, pat)
set_selection(self, file)

 
class LoadFileDialog(FileDialog)
      File selection dialog which checks that the file exists.
 
  
__init__(self, master, title=None) from FileDialog
cancel_command(self, event=None) from FileDialog
dirs_double_event(self, event) from FileDialog
dirs_select_event(self, event) from FileDialog
files_double_event(self, event) from FileDialog
files_select_event(self, event) from FileDialog
filter_command(self, event=None) from FileDialog
get_filter(self) from FileDialog
get_selection(self) from FileDialog
go(self, dir_or_file='.', pattern='*', default='', key=None) from FileDialog
ok_command(self)
ok_event(self, event) from FileDialog
quit(self, how=None) from FileDialog
set_filter(self, dir, pat) from FileDialog
set_selection(self, file) from FileDialog

 
class SaveFileDialog(FileDialog)
      File selection dialog which checks that the file may be created.
 
  
__init__(self, master, title=None) from FileDialog
cancel_command(self, event=None) from FileDialog
dirs_double_event(self, event) from FileDialog
dirs_select_event(self, event) from FileDialog
files_double_event(self, event) from FileDialog
files_select_event(self, event) from FileDialog
filter_command(self, event=None) from FileDialog
get_filter(self) from FileDialog
get_selection(self) from FileDialog
go(self, dir_or_file='.', pattern='*', default='', key=None) from FileDialog
ok_command(self)
ok_event(self, event) from FileDialog
quit(self, how=None) from FileDialog
set_filter(self, dir, pat) from FileDialog
set_selection(self, file) from FileDialog

 
Functions
            
getdouble = float(...)
float(x) -> floating point number
 
Convert a string or number to a floating point number, if possible.
getint = int(...)
int(x[, base]) -> integer
 
Convert a string or number to an integer, if possible.  A floating point
argument will be truncated towards zero (this does not include a string
representation of a floating point number!)  When converting a string, use
the optional base.  It is an error to supply a base when converting a
non-string.
test()
Simple test program.

 
Data
             ACTIVE = 'active'
ALL = 'all'
ANCHOR = 'anchor'
ARC = 'arc'
BASELINE = 'baseline'
BEVEL = 'bevel'
BOTH = 'both'
BOTTOM = 'bottom'
BROWSE = 'browse'
BUTT = 'butt'
BufferType = <type 'buffer'>
BuiltinFunctionType = <type 'builtin_function_or_method'>
BuiltinMethodType = <type 'builtin_function_or_method'>
CASCADE = 'cascade'
CENTER = 'center'
CHAR = 'char'
CHECKBUTTON = 'checkbutton'
CHORD = 'chord'
COMMAND = 'command'
CURRENT = 'current'
ClassType = <type 'class'>
CodeType = <type 'code'>
ComplexType = <type 'complex'>
DISABLED = 'disabled'
DictType = <type 'dictionary'>
DictionaryType = <type 'dictionary'>
E = 'e'
END = 'end'
EW = 'ew'
EXCEPTION = 8
EXTENDED = 'extended'
EllipsisType = <type 'ellipsis'>
FALSE = 0
FIRST = 'first'
FLAT = 'flat'
FileType = <type 'file'>
FloatType = <type 'float'>
FrameType = <type 'frame'>
FunctionType = <type 'function'>
GROOVE = 'groove'
HORIZONTAL = 'horizontal'
INSERT = 'insert'
INSIDE = 'inside'
InstanceType = <type 'instance'>
IntType = <type 'int'>
LAST = 'last'
LEFT = 'left'
LambdaType = <type 'function'>
ListType = <type 'list'>
LongType = <type 'long int'>
MITER = 'miter'
MOVETO = 'moveto'
MULTIPLE = 'multiple'
MethodType = <type 'instance method'>
ModuleType = <type 'module'>
N = 'n'
NE = 'ne'
NO = 0
NONE = 'none'
NORMAL = 'normal'
NS = 'ns'
NSEW = 'nsew'
NUMERIC = 'numeric'
NW = 'nw'
NoneType = <type 'None'>
OFF = 0
ON = 1
OUTSIDE = 'outside'
PAGES = 'pages'
PIESLICE = 'pieslice'
PROJECTING = 'projecting'
RADIOBUTTON = 'radiobutton'
RAISED = 'raised'
READABLE = 2
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'
SliceType = <type 'slice'>
StringType = <type 'string'>
TOP = 'top'
TRUE = 1
TclError = 'TclError'
TclVersion = 8.3000000000000007
TkVersion = 8.3000000000000007
TracebackType = <type 'traceback'>
TupleType = <type 'tuple'>
TypeType = <type 'type'>
UNITS = 'units'
UnboundMethodType = <type 'instance method'>
UnicodeType = <type 'unicode'>
VERTICAL = 'vertical'
W = 'w'
WORD = 'word'
WRITABLE = 4
X = 'x'
XRangeType = <type 'xrange'>
Y = 'y'
YES = 1
__file__ = '/usr/lib/python2.1/lib-tk/FileDialog.pyc'
__name__ = 'FileDialog'
dialogstates = {}