def get_path(self, parent, is_file):
        """Return new path after user edits form."""
        ### store parent
        self.parent = parent

        ### set icon surface according to whether the path
        ### is meant for a file or folder

        self.icon.image = FILE_ICON if is_file else FOLDER_ICON

        ### set caption and "type name" labels' text
        ### according to whether the path is meant for
        ### a file or folder

        ## caption label

        self.caption_label.set(
            t.file_manager.new_path_form.get_new_file
            if is_file
            else t.file_manager.new_path_form.get_new_folder
        )

        draw_border(self.caption_label.image, color=WINDOW_FG, thickness=2)

        ## type name label

        self.type_name_label.set(
            t.file_manager.new_path_form.type_file_name
            if is_file
            else t.file_manager.new_path_form.type_folder_name
        )

        ### set new path to None
        self.new_path = None

        ### TODO loop_holder attribute in block below could probably be
        ### just a local variable instead; check;

        ### loop until running attribute is set to False

        self.running = True
        self.loop_holder = self

        while True:

            try:

                ## run the inner loop

                while self.running:

                    ### perform various checkups for this frame;
                    ###
                    ### stuff like maintaing a constant framerate and more
                    SERVICES_NS.frame_checkups()

                    ### put the handle_input/update/draw method
                    ### execution inside a try clause
                    ### so that the SwitchLoopException
                    ### thrown when focusing in and out of some
                    ### widgets is caught; also, you don't
                    ### need to catch the QuitAppException,
                    ### since it is caught in the main loop

                    self.loop_holder.handle_input()
                    self.loop_holder.update()
                    self.loop_holder.draw()

                ## if we ever leave the inner loop, also exit the outer one
                break

            except SwitchLoopException as err:

                ## use the loop holder in the err
                ## attribute of same name
                self.loop_holder = err.loop_holder

        ### finally, return the new path
        return self.new_path
Return new path after user edits form.
nodezator/fileman/dirpanel/newpathform.py