we can instantiate textbox object as follows:
It returns a textbox widget object. The win argument here should be a curses window object in which the textbox is to be contained. The edit cursor of the textbox is initially located at the upper left hand corner of the containing window, with coordinates as (0, 0). The instance%u2019s stripspaces flag is initially on.
Textbox object have the following methods:
This is an entry point we will normally use. It accepts editing keystrokes until one of the termination keystrokes is entered. If validator is supplied, it must be a function. It will be called for each keystroke entered with the keystroke as a parameter; command dispatch is done on the result. This function returns the window contents as a string; whether blanks in the window are included is affected by the stripspaces attribute.
It returns the window contents as a string; whether blanks in the window are included is affected by the stripspaces member.