The purpose of an Entry widget is to let the
      user see and modify a single line of
      text.
    
          If you want to display multiple
          lines of text that can be edited, see Section 24, “The Text widget”.
        
          If you want to display one or more lines of text that
          cannot be modified by the user,
          see Section 12, “The Label widget”.
        
Some definitions:
          The selection is a highlighted
          region of the text in an Entry widget,
          if there is one.
        
          Typically the selection is made by the user with the
          mouse, and selected text is copied to the system's
          clipboard.  However, Tkinter allows you to control
          whether or not selected text gets copied to the
          clipboard.  You can also select text in an Entry under program control.
        
The insertion cursor shows where new text will be inserted. It is displayed only when the user clicks the mouse somewhere in the widget. It usually appears as a blinking vertical line inside the widget. You can customize its appearance in several ways.
Positions within the widget's displayed text are given as an index. There are several ways to specify an index:
As normal Python indexes, starting from 0.
              The constant tk.END refers to the
              position after the existing text.
            
              The constant tk.INSERT refers to the
              current position of the insertion cursor.
            
              The constant tk.ANCHOR refers to the
              first character of the selection, if there is a
              selection.
            
              You may need to figure out which character position
              in the widget corresponds to a given mouse
              position.  To simplify that process, you can use as
              an index a string of the form '@, where
              n'nEntry widget and the mouse.
              Such an index will specify the character at that
              horizontal mouse position.
            
      To create a new Entry widget in a root
      window or frame named parent
w= tk.Entry(parent,option, ...)
      This constructor returns the new Entry
      widget.  Options include:
    
Table 17. Entry widget options
| bgorbackground | The background color inside the entry area. Default is a light gray. | 
| bdorborderwidth | The width of the border around the entry area; see Section 5.1, “Dimensions”. The default is two pixels. | 
| cursor | The cursor used when the mouse is within the entry widget; see Section 5.8, “Cursors”. | 
| disabledbackground | The background color to be displayed when the
              widget is in the tk.DISABLEDstate.
              For option values, seebgabove. | 
| disabledforeground | The foreground color to be displayed when the
              widget is in the tk.DISABLEDstate.
              For option values, seefgbelow. | 
| exportselection | By default, if you select text within an Entrywidget, it is automatically exported
              to the clipboard.  To avoid this exportation, useexportselection=0. | 
| fgorforeground | The color used to render the text. Default is black. | 
| font | The font used for text entered in the widget by the user. See Section 5.4, “Type fonts”. | 
| highlightbackground | Color of the focus highlight when the widget does not have focus. See Section 53, “Focus: routing keyboard input”. | 
| highlightcolor | Color shown in the focus highlight when the widget has the focus. | 
| highlightthickness | Thickness of the focus highlight. | 
| insertbackground | By default, the insertion cursor (which shows the
              point within the text where new keyboard input will
              be inserted) is black.  To get a different color of
              insertion cursor, set insertbackgroundto any color; see Section 5.3, “Colors”. | 
| insertborderwidth | By default, the insertion cursor is a simple
              rectangle.  You can get the cursor with the tk.RAISEDrelief effect (see Section 5.6, “Relief styles”) by settinginsertborderwidthto the dimension of the 3-d
              border.  If you do, make sure that theinsertwidthoption is at least twice
              that value. | 
| insertofftime | By default, the insertion cursor blinks.  You can
              set insertofftimeto a value in
              milliseconds to specify how much time the insertion
              cursor spends off.  Default is 300.  If you useinsertofftime=0, the insertion
              cursor won't blink at all. | 
| insertontime | Similar to insertofftime, this
              option specifies how much time the cursor spends
              on per blink.  Default is 600 (milliseconds). | 
| insertwidth | By default, the insertion cursor is 2 pixels wide.
              You can adjust this by setting insertwidthto any dimension. | 
| justify | This option controls how the text is justified when
              the text doesn't fill the widget's width.  The
              value can be tk.LEFT(the default),tk.CENTER, ortk.RIGHT. | 
| readonlybackground | The background color to be displayed when the
              widget's stateoption is'readonly'. | 
| relief | Selects three-dimensional shading effects around
              the text entry.  See Section 5.6, “Relief styles”.  The
              default is relief=tk.SUNKEN. | 
| selectbackground | The background color to use displaying selected text. See Section 5.3, “Colors”. | 
| selectborderwidth | The width of the border to use around selected text. The default is one pixel. | 
| selectforeground | The foreground (text) color of selected text. | 
| show | Normally, the characters that the user types appear
              in the entry.  To make a “password”
              entry that echoes each character as an asterisk,
              set show='*'. | 
| state | Use this option to disable the Entrywidget so that the user can't type
              anything into it.  Usestate=tk.DISABLEDto disable the widget,state=tk.NORMALto allow user input again.  Your program can also
              find out whether the cursor is currently over the
              widget by interrogating this option; it will
              have the valuetk.ACTIVEwhen the mouse
              is over it.  You can also set this option to'disabled', which is like thetk.DISABLEDstate, but the contents of the
              widget can still be selected or copied. | 
| takefocus | By default, the focus will tab through entry widgets. Set this option to 0 to take the widget out of the sequence. For a discussion of focus, see Section 53, “Focus: routing keyboard input”. | 
| textvariable | In order to be able to retrieve the current text
              from your entry widget, you must set this option to
              an instance of the StringVarclass;
              see Section 52, “Control variables: the values behind the widgets”.  You can
              retrieve the text using, or set
              it using, whereis the
              associated control variable. | 
| validate | 
                You can use this option to set up the widget so that
                its contents are checked by a validation function at
                certain times.  See Section 10.2, “Adding validation to an  | 
| validatecommand | A callback that validates the text of the widget.
              See Section 10.2, “Adding validation to an Entrywidget”. | 
| width | The size of the entry in characters. The default is
              20.  For proportional fonts, the physical length of
              the widget will be based on the average width of a
              character times the value of the widthoption. | 
| xscrollcommand | If you expect that users will often enter more text
              than the onscreen size of the widget, you can link
              your entry widget to a scrollbar.  Set this option
              to the .setmethod of the scrollbar.
              For more information, see Section 10.1, “Scrolling anEntrywidget”. | 
      Methods on Entry objects include:
    
.delete(first,
          last=None)
        
            Deletes characters from the widget, starting with the
            one at index firstlastfirst
.get()
        Returns the entry's current text as a string.
.icursor(index)
        
            Set the insertion cursor just before the character at
            the given index
.index(index)
        
            Shift the contents of the entry so that the character
            at the given index
.insert(index,
          s)
        
            Inserts string sindex
.scan_dragto(x)
        
            See the scan_mark method below.
          
.scan_mark(x)
        
            Use this option to set up fast scanning of the
            contents of the Entry widget that has
            a scrollbar that supports horizontal scrolling.
          
            To implement this feature, bind the mouse's
            button-down event to a handler that calls scan_mark(,
            where x)xx<Motion> event to a handler that
            calls scan_dragto(, where x)xxscan_dragto method scrolls the contents of
            the Entry widget continuously at a
            rate proportional to the horizontal distance between
            the position at the time of the scan_mark call and the current position.
          
.select_adjust(index)
        
            This method is used to make sure that the selection includes
            the character at the specified indexindex
.select_clear()
        Clears the selection. If there isn't currently a selection, has no effect.
.select_from(index)
        
            Sets the tk.ANCHOR index position to the
            character selected by index
.select_present()
        If there is a selection, returns true, else returns false.
.select_range(start, end)
        
            Sets the selection under
            program control.  Selects the text starting at the
            startindexendstartend
            To select all the text in an entry widget e, use e.select_range(0, tk.END).
          
.select_to(index)
        
            Selects all the text from the tk.ANCHOR
            position up to but not including the character at the
            given index
.xview(index)
        
            Same as .xview().  This method is
            useful in linking the Entry widget to
            a horizontal scrollbar.  See Section 10.1, “Scrolling an Entry widget”.
          
.xview_moveto(f)
        
            Positions the text in the entry so that the character
            at position ff
.xview_scroll(number, what)
        
            Used to scroll the entry horizontally.  The whattk.UNITS, to scroll by
            character widths, or tk.PAGES, to scroll
            by chunks the size of the entry widget.  The numbere, e.xview_scroll(-1,
            tk.PAGES) would move the text one
            “page” to the right, and e.xview_scroll(4, tk.UNITS) would move the text
            four characters to the left.