images_alignment.application.utils module

Utilities functions or Classes

images_alignment.application.utils.add(obj, row, col, sticky='', padx=5, pady=3, rspan=1, cspan=1, **kwargs)

Add tkinter object at the (row, col)-position of a grid

images_alignment.application.utils.add_entry(frame, row, label, val, width=5, bind_fun=None)

Add 2 columns : ‘label’ and ‘val’ associated to a binding function ‘bind_fun’ at ‘row’ (int) position in a ‘frame’ (Tk.Frame)

images_alignment.application.utils.hsorted(list_)

Sort the given list in the way that humans expect

class images_alignment.application.utils.Terminal(root)

Bases: Text

Class inherited from Tkinter.Text with a write() function

Construct a text widget with the parent MASTER.

STANDARD OPTIONS

background, borderwidth, cursor, exportselection, font, foreground, highlightbackground, highlightcolor, highlightthickness, insertbackground, insertborderwidth, insertofftime, insertontime, insertwidth, padx, pady, relief, selectbackground, selectborderwidth, selectforeground, setgrid, takefocus, xscrollcommand, yscrollcommand,

WIDGET-SPECIFIC OPTIONS

autoseparators, height, maxundo, spacing1, spacing2, spacing3, state, tabs, undo, width, wrap,

write(value)

Write ‘value’ in the related Tkinter.Text object

class images_alignment.application.utils.FilesSelector(root, lbox_size=None)

Bases: object

Class dedicated to the files selection

lbox

Listbox associated to the selected files

Type:

list of Listbox object

fnames

List of filenames to work with

Type:

list of str

Parameters:
  • root (Tk.widget) – The main window associated to the FileSelector

  • lbox_size (list of 2 ints, optional) – Size (width, height) of the Listbox ‘lbox’. Default value is [30, 15]

move(key)

Move cursor selection according to key value (up or down)

add_items(fnames=None, ind_start=None)

Add items from a ‘fnames’ list

select_files(fnames=None)

Add items from selected files

select_dir(dirname=None)

Add items from a directory

remove()

Remove selected items

remove_all()

Remove all items

select_item(index, selection_clear=True)

Select item in the listbox