def select_paths(
        self,
        *,
        caption="",
        path_name="",
        expecting_files_only=False,
    ):
        """Return selected paths.

        This method shows the user the file manager
        interface, allowing the user to browse the
        filesystem visually while selecting paths
        to be returned or providing the name for new
        path(s) to be created.

        Parameters
        ==========

        caption (string)
            represents a caption for the widget.
        path_name (string)
            It is used as a path name to be included in the
            selected paths entry. It can actually represent
            multiple path names, as long as you separate each
            path with the path separator character (os.pathsep).
        expecting_files_only (bool)
            When set to True, clicking folders won't cause their
            names to appear in the selection entry. Default is
            False.
        """
        ### blit screen sized semi transparent object

        blit_on_screen(UNHIGHLIGHT_SURF_MAP[SCREEN_RECT.size], (0, 0))

        ### update widget caption label

        self.caption_label.set(

            caption
            if caption
            else t.file_manager.select_paths

        )

        ### store flag
        self.expecting_files_only = expecting_files_only

        ### load paths from the current directory so they
        ### are displayed in the directory panel
        self.dir_panel.load_current_dir_contents()

        ### check whether the current bookmarks still exists
        self.bkm_panel.check_live_bookmarks()

        ### set entry contents
        self.selection_entry.set(path_name)

        ### alias self as the loop holder
        loop_holder = self

        ### set an attribute to keep track of when the user cancelled
        ### selecting paths
        self.cancelled = False

        ### keep looping the execution of methods
        ### "handle_input", "update" and "drawing" of the
        ### loop holder until running is set to False

        self.running = True

        while True:

            try:

                while self.running:

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

                    ### run the GUD methods (check the glossary
                    ### for loop holder/loop/methods)

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

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

            ### if a SwitchLoopException occur, set a new
            ### object to become the loop holder

            except SwitchLoopException as err:

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

        ### blit smaller semi transparent object
        self.rect_size_semitransp_obj.draw()

        ### if the user didn't cancel and only files are expected to be
        ### selected, we must update the selection according to the entry,
        ### since they might be out of sync

        ### XXX review behaviour of this expecting_files_only flag.
        ### For instance, what if the person selected folders as well?
        ### When you do that, update docstrings and related comments
        ### accordingly

        if not self.cancelled and self.expecting_files_only:
            self.update_selection_from_entry()

        ### return a copy of the path selection
        return tuple(self.path_selection)
Return selected paths.

        This method shows the user the file manager
        interface, allowing the user to browse the
        filesystem visually while selecting paths
        to be returned or providing the name for new
        path(s) to be created.

        Parameters
        ==========

        caption (string)
            represents a caption for the widget.
        path_name (string)
            It is used as a path name to be included in the
            selected paths entry. It can actually represent
            multiple path names, as long as you separate each
            path with the path separator character (os.pathsep).
        expecting_files_only (bool)
            When set to True, clicking folders won't cause their
            names to appear in the selection entry. Default is
            False.
        
nodezator/fileman/op.py