def input(self, prompt='', x=None, y=None, maxlength=None, fgcolor=None, bgcolor=None, promptfgcolor=None, promptbgcolor=None, whitelistchars=None, blacklistchars=None, callbackfn=None, fps=60, repeat=20, delay=0.25):
        """
        A pygcurse version of the input() and raw_input() functions. When called, it displays a cursor on the screen and lets the user type in a string. This function blocks until the user presses Enter, and it returns the string the user typed in.

        In fact, this function can be used as a drop-in replacement of Python's input() to convert a stdio text-based Python program to a graphical Pygcurse program. See the PygcurseWindow class for details.

        - prompt is a string that is displayed at the beginning of the input area
        - x and y are cell coordinates for where the beginning of the input area should be. By default it is where the cursor is.
        - maxlength is the maximum number of characters that the user can enter. By default it is 4094 characters if the keyboard input can span multiple lines, or to the end of the current row if the x value is specified.
        - fgcolor and bgcolor are the foreground and background colors of the text typed by the user.
        - promptfgcolor and promptbgcolor are the foreground and background colors of the prompt.
        - whitelistchars is a string of the characters that are allowed to be entered from the keyboard. If None, then all characters (except those in the blacklist, if one is specified) are allowed.
        - blacklistchars is a string of the characters that are prohibited to be entered from the keyboard. If None, then all characters (if they are in the whitelist, if one is specified) are allowed.
        - callbackfn is a function that is called during the input() method's loop. This can be used for any additional code that needs to be run while waiting for the user to enter text. It takes one parameter, which is the PygcurseInput object currently in use.
        - fps specifies how many times per second this function should update the screen (ie, frames per second). If left at None, then input() will simply try to update as fast as possible.
        - repeat specifies how many times a second a held down key's event is triggered
        - delay is the number of seconds between a key being pressed, and its event being triggered due to it being held
        """
        clock = pygame.time.Clock()
        inputObj = PygcurseInput(self, prompt, x, y, maxlength, fgcolor, bgcolor, promptfgcolor, promptbgcolor, whitelistchars, blacklistchars, self)
        self.inputcursor = inputObj.startx, inputObj.starty

        counter = 0
        held_down = []
        while True: # the event loop
            counter += 1
            if counter >= fps//repeat:
                counter = 0
                for e, t in held_down:
                    if time.time() - t > delay:
                        inputObj.sendkeyevent(e)

            self._inputcursormode = inputObj.insertMode and 'insert' or 'underline'

            #The only thing a callbackfn might want to have access to that it couldn't legitimately have access to
            #through closures is our inputobj - so we hand it to it! You'll also note that we call it before processing
            #the pygame event queue so that it has first pick of the incoming events.
            #Of course, we only call callbackfn if it is non-None.
            if callbackfn:
                try:
                    callbackfn(inputObj)
                except TypeError as e:
                    #However, old callbackfn()s might not expect a parameter - so if we get such an error,
                    #we just call it again without the parameter.
                    #Gotta make sure it was this specific thing that caused the error, though.
                    if e.args[0] == "callbackfn() takes 0 positional arguments but 1 was given":
                        callbackfn()
                    else:
                        #if not, reraise it.
                        raise

            #As explained in a comment in waitforkeypress, only pulling out specific event types causes the
            #program to hang if other events happen.
            for event in pygame.event.get(): # TODO - handle holding down the keys
                if event.type == QUIT:
                    pygame.quit()
                    sys.exit()

                if event.type == KEYUP:
                    held_down = [(e,t) for (e,t) in held_down if e.key != event.key]

                elif event.type == KEYDOWN:
                    if all(e[0] != event for e in held_down):
                        held_down.append((event, time.time(),))

                if event.type in (KEYDOWN, KEYUP):
                    inputObj.sendkeyevent(event)
                    if inputObj.done:
                        return ''.join(inputObj.buffer)

            inputObj.update()
            self.update()

            clock.tick(fps)
dataset/ETHPy150Open asweigart/pygcurse/pygcurse/__init__.py/PygcurseSurface.input/operator `>=` -> `>`