labscript_utils.excepthook.tk_exception.ErrorWindow

class labscript_utils.excepthook.tk_exception.ErrorWindow(master=None, **kw)[source]

Bases: Text

Class to display the error in a textbox. Parts copied from Tkinter’s ScrolledText widget

__init__(master=None, **kw)[source]

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,

Methods

__init__([master])

Construct a text widget with the parent MASTER.

after(ms[, func])

Call function once after given time.

after_cancel(id)

Cancel scheduling of function identified with ID.

after_idle(func, *args)

Call FUNC once if the Tcl main loop has no event to process.

anchor([anchor])

The anchor value controls how to place the grid within the master when no row/column has any weight.

bbox(index)

Return a tuple of (x,y,width,height) which gives the bounding box of the visible part of the character at the given index.

bell([displayof])

Ring a display's bell.

bind([sequence, func, add])

Bind to this widget at event SEQUENCE a call to function FUNC.

bind_all([sequence, func, add])

Bind to all widgets at an event SEQUENCE a call to function FUNC.

bind_class(className[, sequence, func, add])

Bind to widgets with bindtag CLASSNAME at event SEQUENCE a call of function FUNC.

bindtags([tagList])

Set or get the list of bindtags for this widget.

cget(key)

Return the resource value for a KEY given as string.

clipboard_append(string, **kw)

Append STRING to the Tk clipboard.

clipboard_clear(**kw)

Clear the data in the Tk clipboard.

clipboard_get(**kw)

Retrieve data from the clipboard on window's display.

columnconfigure(index[, cnf])

Configure column INDEX of a grid.

compare(index1, op, index2)

Return whether between index INDEX1 and index INDEX2 the relation OP is satisfied.

config([cnf])

Configure resources of a widget.

configure([cnf])

Configure resources of a widget.

copy([event])

count(index1, index2, *args)

Counts the number of relevant things between the two indices.

debug([boolean])

Turn on the internal consistency checks of the B-Tree inside the text widget according to BOOLEAN.

delete(index1[, index2])

Delete the characters between INDEX1 and INDEX2 (not included).

deletecommand(name)

Internal function.

destroy()

Destroy this and all descendants widgets.

dlineinfo(index)

Return tuple (x,y,width,height,baseline) giving the bounding box and baseline position of the visible part of the line containing the character at INDEX.

dump(index1[, index2, command])

Return the contents of the widget between index1 and index2.

edit(*args)

Internal method

edit_modified([arg])

Get or Set the modified flag

edit_redo()

Redo the last undone edit

edit_reset()

Clears the undo and redo stacks

edit_separator()

Inserts a separator (boundary) on the undo stack.

edit_undo()

Undoes the last edit action

event_add(virtual, *sequences)

Bind a virtual event VIRTUAL (of the form <<Name>>) to an event SEQUENCE such that the virtual event is triggered whenever SEQUENCE occurs.

event_delete(virtual, *sequences)

Unbind a virtual event VIRTUAL from SEQUENCE.

event_generate(sequence, **kw)

Generate an event SEQUENCE.

event_info([virtual])

Return a list of all virtual events or the information about the SEQUENCE bound to the virtual event VIRTUAL.

focus()

Direct input focus to this widget.

focus_displayof()

Return the widget which has currently the focus on the display where this widget is located.

focus_force()

Direct input focus to this widget even if the application does not have the focus.

focus_get()

Return the widget which has currently the focus in the application.

focus_lastfor()

Return the widget which would have the focus if top level for this widget gets the focus from the window manager.

focus_set()

Direct input focus to this widget.

forget()

Unmap this widget and do not use it for the packing order.

get(index1[, index2])

Return the text from INDEX1 to INDEX2 (not included).

getboolean(s)

Return a boolean value for Tcl boolean values true and false given as parameter.

getdouble(s)

getint(s)

getvar([name])

Return value of Tcl variable NAME.

grab_current()

Return widget which has currently the grab in this application or None.

grab_release()

Release grab for this widget if currently set.

grab_set()

Set grab for this widget.

grab_set_global()

Set global grab for this widget.

grab_status()

Return None, "local" or "global" if this widget has no, a local or a global grab.

grid([cnf])

Position a widget in the parent widget in a grid. Use as options: column=number - use cell identified with given column (starting with 0) columnspan=number - this widget will span several columns in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction row=number - use cell identified with given row (starting with 0) rowspan=number - this widget will span several rows sticky=NSEW - if cell is larger on which sides will this widget stick to the cell boundary.

grid_anchor([anchor])

The anchor value controls how to place the grid within the master when no row/column has any weight.

grid_bbox([column, row, col2, row2])

Return a tuple of integer coordinates for the bounding box of this widget controlled by the geometry manager grid.

grid_columnconfigure(index[, cnf])

Configure column INDEX of a grid.

grid_configure([cnf])

Position a widget in the parent widget in a grid. Use as options: column=number - use cell identified with given column (starting with 0) columnspan=number - this widget will span several columns in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction row=number - use cell identified with given row (starting with 0) rowspan=number - this widget will span several rows sticky=NSEW - if cell is larger on which sides will this widget stick to the cell boundary.

grid_forget()

Unmap this widget.

grid_info()

Return information about the options for positioning this widget in a grid.

grid_location(x, y)

Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.

grid_propagate([flag])

Set or get the status for propagation of geometry information.

grid_remove()

Unmap this widget but remember the grid options.

grid_rowconfigure(index[, cnf])

Configure row INDEX of a grid.

grid_size()

Return a tuple of the number of column and rows in the grid.

grid_slaves([row, column])

Return a list of all slaves of this widget in its packing order.

image_cget(index, option)

Return the value of OPTION of an embedded image at INDEX.

image_configure(index[, cnf])

Configure an embedded image at INDEX.

image_create(index[, cnf])

Create an embedded image at INDEX.

image_names()

Return all names of embedded images in this widget.

image_types()

Return a list of all available image types (e.g. photo bitmap).

index(index)

Return the index in the form line.char for INDEX.

info()

Return information about the packing options for this widget.

info_patchlevel()

Returns the exact version of the Tcl library.

insert(index, chars, *args)

Insert CHARS before the characters at INDEX.

keys()

Return a list of all resource names of this widget.

lift([aboveThis])

Raise this widget in the stacking order.

location(x, y)

Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.

lower([belowThis])

Lower this widget in the stacking order.

mainloop([n])

Call the mainloop of Tk.

mark_gravity(markName[, direction])

Change the gravity of a mark MARKNAME to DIRECTION (LEFT or RIGHT).

mark_names()

Return all mark names.

mark_next(index)

Return the name of the next mark after INDEX.

mark_previous(index)

Return the name of the previous mark before INDEX.

mark_set(markName, index)

Set mark MARKNAME before the character at INDEX.

mark_unset(*markNames)

Delete all marks in MARKNAMES.

nametowidget(name)

Return the Tkinter instance of a widget identified by its Tcl name NAME.

ok_clicked(*ignore)

option_add(pattern, value[, priority])

Set a VALUE (second parameter) for an option PATTERN (first parameter).

option_clear()

Clear the option database.

option_get(name, className)

Return the value for an option NAME for this widget with CLASSNAME.

option_readfile(fileName[, priority])

Read file FILENAME into the option database.

pack([cnf])

Pack a widget in the parent widget. Use as options: after=widget - pack it after you have packed widget anchor=NSEW (or subset) - position widget according to given direction before=widget - pack it before you will pack widget expand=bool - expand widget if parent size grows fill=NONE or X or Y or BOTH - fill widget if widget grows in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction side=TOP or BOTTOM or LEFT or RIGHT - where to add this widget.

pack_configure([cnf])

Pack a widget in the parent widget. Use as options: after=widget - pack it after you have packed widget anchor=NSEW (or subset) - position widget according to given direction before=widget - pack it before you will pack widget expand=bool - expand widget if parent size grows fill=NONE or X or Y or BOTH - fill widget if widget grows in=master - use master to contain this widget in_=master - see 'in' option description ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction side=TOP or BOTTOM or LEFT or RIGHT - where to add this widget.

pack_forget()

Unmap this widget and do not use it for the packing order.

pack_info()

Return information about the packing options for this widget.

pack_propagate([flag])

Set or get the status for propagation of geometry information.

pack_slaves()

Return a list of all slaves of this widget in its packing order.

peer_create(newPathName[, cnf])

Creates a peer text widget with the given newPathName, and any optional standard configuration options.

peer_names()

Returns a list of peers of this widget (this does not include the widget itself).

place([cnf])

Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed in_=master - see 'in' option description x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account.

place_configure([cnf])

Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed in_=master - see 'in' option description x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account.

place_forget()

Unmap this widget.

place_info()

Return information about the placing options for this widget.

place_slaves()

Return a list of all slaves of this widget in its packing order.

propagate([flag])

Set or get the status for propagation of geometry information.

quit()

Quit the Tcl interpreter.

register(func[, subst, needcleanup])

Return a newly created Tcl function.

replace(index1, index2, chars, *args)

Replaces the range of characters between index1 and index2 with the given characters and tags specified by args.

rowconfigure(index[, cnf])

Configure row INDEX of a grid.

scan_dragto(x, y)

Adjust the view of the text to 10 times the difference between X and Y and the coordinates given in scan_mark.

scan_mark(x, y)

Remember the current X, Y coordinates.

search(pattern, index[, stopindex, ...])

Search PATTERN beginning from INDEX until STOPINDEX.

see(index)

Scroll such that the character at INDEX is visible.

selection_clear(**kw)

Clear the current X selection.

selection_get(**kw)

Return the contents of the current X selection.

selection_handle(command, **kw)

Specify a function COMMAND to call if the X selection owned by this widget is queried by another application.

selection_own(**kw)

Become owner of X selection.

selection_own_get(**kw)

Return owner of X selection.

send(interp, cmd, *args)

Send Tcl command CMD to different interpreter INTERP to be executed.

setvar([name, value])

Set Tcl variable NAME to VALUE.

size()

Return a tuple of the number of column and rows in the grid.

slaves()

Return a list of all slaves of this widget in its packing order.

tag_add(tagName, index1, *args)

Add tag TAGNAME to all characters between INDEX1 and index2 in ARGS.

tag_bind(tagName, sequence, func[, add])

Bind to all characters with TAGNAME at event SEQUENCE a call to function FUNC.

tag_cget(tagName, option)

Return the value of OPTION for tag TAGNAME.

tag_config(tagName[, cnf])

Configure a tag TAGNAME.

tag_configure(tagName[, cnf])

Configure a tag TAGNAME.

tag_delete(*tagNames)

Delete all tags in TAGNAMES.

tag_lower(tagName[, belowThis])

Change the priority of tag TAGNAME such that it is lower than the priority of BELOWTHIS.

tag_names([index])

Return a list of all tag names.

tag_nextrange(tagName, index1[, index2])

Return a list of start and end index for the first sequence of characters between INDEX1 and INDEX2 which all have tag TAGNAME.

tag_prevrange(tagName, index1[, index2])

Return a list of start and end index for the first sequence of characters between INDEX1 and INDEX2 which all have tag TAGNAME.

tag_raise(tagName[, aboveThis])

Change the priority of tag TAGNAME such that it is higher than the priority of ABOVETHIS.

tag_ranges(tagName)

Return a list of ranges of text which have tag TAGNAME.

tag_remove(tagName, index1[, index2])

Remove tag TAGNAME from all characters between INDEX1 and INDEX2.

tag_unbind(tagName, sequence[, funcid])

Unbind for all characters with TAGNAME for event SEQUENCE the function identified with FUNCID.

tk_bisque()

Change the color scheme to light brown as used in Tk 3.6 and before.

tk_focusFollowsMouse()

The widget under mouse will get automatically focus.

tk_focusNext()

Return the next widget in the focus order which follows widget which has currently the focus.

tk_focusPrev()

Return previous widget in the focus order.

tk_setPalette(*args, **kw)

Set a new color scheme for all widget elements.

tk_strictMotif([boolean])

Set Tcl internal variable, whether the look and feel should adhere to Motif.

tkraise([aboveThis])

Raise this widget in the stacking order.

unbind(sequence[, funcid])

Unbind for this widget for event SEQUENCE the function identified with FUNCID.

unbind_all(sequence)

Unbind for all widgets for event SEQUENCE all functions.

unbind_class(className, sequence)

Unbind for all widgets with bindtag CLASSNAME for event SEQUENCE all functions.

update()

Enter event loop until all pending events have been processed by Tcl.

update_idletasks()

Enter event loop until all idle callbacks have been called.

wait_variable([name])

Wait until the variable is modified.

wait_visibility([window])

Wait until the visibility of a WIDGET changes (e.g. it appears).

wait_window([window])

Wait until a WIDGET is destroyed.

waitvar([name])

Wait until the variable is modified.

window_cget(index, option)

Return the value of OPTION of an embedded window at INDEX.

window_config(index[, cnf])

Configure an embedded window at INDEX.

window_configure(index[, cnf])

Configure an embedded window at INDEX.

window_create(index[, cnf])

Create a window at INDEX.

window_names()

Return all names of embedded windows in this widget.

winfo_atom(name[, displayof])

Return integer which represents atom NAME.

winfo_atomname(id[, displayof])

Return name of atom with identifier ID.

winfo_cells()

Return number of cells in the colormap for this widget.

winfo_children()

Return a list of all widgets which are children of this widget.

winfo_class()

Return window class name of this widget.

winfo_colormapfull()

Return True if at the last color request the colormap was full.

winfo_containing(rootX, rootY[, displayof])

Return the widget which is at the root coordinates ROOTX, ROOTY.

winfo_depth()

Return the number of bits per pixel.

winfo_exists()

Return true if this widget exists.

winfo_fpixels(number)

Return the number of pixels for the given distance NUMBER (e.g. "3c") as float.

winfo_geometry()

Return geometry string for this widget in the form "widthxheight+X+Y".

winfo_height()

Return height of this widget.

winfo_id()

Return identifier ID for this widget.

winfo_interps([displayof])

Return the name of all Tcl interpreters for this display.

winfo_ismapped()

Return true if this widget is mapped.

winfo_manager()

Return the window manager name for this widget.

winfo_name()

Return the name of this widget.

winfo_parent()

Return the name of the parent of this widget.

winfo_pathname(id[, displayof])

Return the pathname of the widget given by ID.

winfo_pixels(number)

Rounded integer value of winfo_fpixels.

winfo_pointerx()

Return the x coordinate of the pointer on the root window.

winfo_pointerxy()

Return a tuple of x and y coordinates of the pointer on the root window.

winfo_pointery()

Return the y coordinate of the pointer on the root window.

winfo_reqheight()

Return requested height of this widget.

winfo_reqwidth()

Return requested width of this widget.

winfo_rgb(color)

Return a tuple of integer RGB values in range(65536) for color in this widget.

winfo_rootx()

Return x coordinate of upper left corner of this widget on the root window.

winfo_rooty()

Return y coordinate of upper left corner of this widget on the root window.

winfo_screen()

Return the screen name of this widget.

winfo_screencells()

Return the number of the cells in the colormap of the screen of this widget.

winfo_screendepth()

Return the number of bits per pixel of the root window of the screen of this widget.

winfo_screenheight()

Return the number of pixels of the height of the screen of this widget in pixel.

winfo_screenmmheight()

Return the number of pixels of the height of the screen of this widget in mm.

winfo_screenmmwidth()

Return the number of pixels of the width of the screen of this widget in mm.

winfo_screenvisual()

Return one of the strings directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor for the default colormodel of this screen.

winfo_screenwidth()

Return the number of pixels of the width of the screen of this widget in pixel.

winfo_server()

Return information of the X-Server of the screen of this widget in the form "XmajorRminor vendor vendorVersion".

winfo_toplevel()

Return the toplevel widget of this widget.

winfo_viewable()

Return true if the widget and all its higher ancestors are mapped.

winfo_visual()

Return one of the strings directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor for the colormodel of this widget.

winfo_visualid()

Return the X identifier for the visual for this widget.

winfo_visualsavailable([includeids])

Return a list of all visuals available for the screen of this widget.

winfo_vrootheight()

Return the height of the virtual root window associated with this widget in pixels.

winfo_vrootwidth()

Return the width of the virtual root window associated with this widget in pixel.

winfo_vrootx()

Return the x offset of the virtual root relative to the root window of the screen of this widget.

winfo_vrooty()

Return the y offset of the virtual root relative to the root window of the screen of this widget.

winfo_width()

Return the width of this widget.

winfo_x()

Return the x coordinate of the upper left corner of this widget in the parent.

winfo_y()

Return the y coordinate of the upper left corner of this widget in the parent.

xview(*args)

Query and change the horizontal position of the view.

xview_moveto(fraction)

Adjusts the view in the window so that FRACTION of the total width of the canvas is off-screen to the left.

xview_scroll(number, what)

Shift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT).

yview(*args)

Query and change the vertical position of the view.

yview_moveto(fraction)

Adjusts the view in the window so that FRACTION of the total height of the canvas is off-screen to the top.

yview_pickplace(*what)

Obsolete function, use see.

yview_scroll(number, what)

Shift the y-view according to NUMBER which is measured in "units" or "pages" (WHAT).

copy(event=None)[source]
ok_clicked(*ignore)[source]