traitsui.file_dialog module

Defines functions and classes used to create pop-up file dialogs for opening and saving files.

class traitsui.file_dialog.CreateDirHandler

Bases: traitsui.handler.Handler

Controller for the ‘create new directory’ popup.

handler_cancel_changed(info)

Handles the user clicking the Cancel button.

handler_ok_changed(info)

Handles the user clicking the OK button.

class traitsui.file_dialog.FileExistsHandler

Bases: traitsui.handler.Handler

Controller for the ‘file already exists’ popup.

handler_cancel_changed(info)

Handles the user clicking the Cancel button.

handler_ok_changed(info)

Handles the user clicking the OK button.

class traitsui.file_dialog.FileInfo

Bases: traitsui.file_dialog.MFileDialogModel

Defines a file dialog extension that display various file information.

class traitsui.file_dialog.IFileDialogExtension

Bases: traitsui.file_dialog.IFileDialogModel, traitsui.file_dialog.IFileDialogView

Defines a (convenience) union of the IFileDialogModel and IFileDialogView interfaces.

class traitsui.file_dialog.IFileDialogModel

Bases: traits.has_traits.Interface

Defines a model extension to a file dialog.

class traitsui.file_dialog.IFileDialogView

Bases: traits.has_traits.Interface

Defines a visual extension to a file dialog.

class traitsui.file_dialog.ImageInfo

Bases: traitsui.file_dialog.MFileDialogModel

Defines a file dialog extension that display an image file’s dimensions and content.

class traitsui.file_dialog.MFileDialogExtension

Bases: traitsui.file_dialog.MFileDialogModel, traitsui.file_dialog.MFileDialogView

Defines a (convenience) union of the MFileDialogModel and MFileDialogView mix-in classes.

class traitsui.file_dialog.MFileDialogModel

Bases: traits.has_traits.HasPrivateTraits

class traitsui.file_dialog.MFileDialogView

Bases: traits.has_traits.HasPrivateTraits

Defines a visual extension to a file dialog.

class traitsui.file_dialog.OpenFileDialog

Bases: traitsui.handler.Handler

Defines the model and handler for the open file dialog.

init_info(info)

Handles the UIInfo object being initialized during view start-up.

object_cancel_changed(info)

Handles the user clicking the Cancel button.

object_create_changed(info)

Handles the user clicking the create directory button.

object_ok_changed(info)

Handles the user clicking the OK button.

open_file_view()

Returns the file dialog view to use.

class traitsui.file_dialog.TextInfo

Bases: traitsui.file_dialog.MFileDialogModel

Defines a file dialog extension that displays a file’s contents as text.

traitsui.file_dialog.open_file(**traits)

Returns a file name to open or an empty string if the user cancels the operation.

traitsui.file_dialog.save_file(**traits)

Returns a file name to save to or an empty string if the user cancels the operation. In the case where the file selected already exists, the user will be prompted if they want to overwrite the file before the selected file name is returned.

Previous topic

traitsui.editors_gen module

Next topic

traitsui.group module

This Page