docs: def view_directory(dname=None, fname=None, verbose=True):
      """
      View a directory in the operating system file browser. Currently supports
      windows explorer, mac open, and linux nautlius.
  
      Args:
          dname (str): directory name
          fname (str): a filename to select in the directory (nautlius only)
          verbose (bool):
  
      CommandLine:
          python -m utool.util_cplat --test-view_directory
  
      Example:
          >>> # DISABLE_DOCTEST
          >>> # DOCTEST_DISABLE
          >>> from utool.util_cplat import *  # NOQA
          >>> import utool as ut
          >>> dname = ut.truepath('~')
          >>> verbose = True
          >>> view_directory(dname, verbose)
  
      Example:
          >>> # DISABLE_DOCTEST
          >>> from utool.util_cplat import *  # NOQA
          >>> import utool as ut
          >>> base = ut.ensure_app_cache_dir('utool', 'test_vd')
          >>> dirs = [
          >>>     '',
          >>>     'dir1',
          >>>     'has space',
          >>>     'space at end ',
          >>>     ' space at start ',
          >>>     '"quotes and spaces"',
          >>>     "'single quotes and spaces'",
          >>>     'Frogram Piles (y2K)',
          >>> ]
          >>> dirs_ = [ut.ensuredir(join(base, d)) for d in dirs]
          >>> for dname in dirs_:
          >>>     ut.view_directory(dname, verbose=False)
          >>> fpath = join(base, 'afile.txt')
          >>> ut.touch(fpath)
          >>> ut.view_directory(base, fpath, verbose=False)
      """
      from utool.util_arg import STRICT
      from utool.util_path import checkpath
      # from utool.util_str import SINGLE_QUOTE, DOUBLE_QUOTE
  
      if HAVE_PATHLIB and isinstance(dname, pathlib.Path):
          dname = str(dname)
  
      if verbose:
          print('[cplat] view_directory(%r) ' % dname)
      dname = os.getcwd() if dname is None else dname
      open_prog = {
          'win32': 'explorer.exe',
          'linux': 'nautilus',
          'darwin': 'open'
      }[OS_TYPE]
      dname = normpath(dname)
      if STRICT:
          assert checkpath(dname, verbose=verbose), 'directory doesnt exit'
      if fname is not None and OS_TYPE == 'linux':
          arg = join(dname, fname)
      else:
          arg = dname
      # if ' ' in dname and not dname.startswith((SINGLE_QUOTE, DOUBLE_QUOTE)):
      #     # Ensure quotations
      #     dname = '"%s"' % dname
      # if not WIN32:
      #     arg = dname
      #     # arg = subprocess.list2cmdline([dname])
      #     # arg = pipes.quote(dname)
      # else:
      #     arg = dname
      # spawn and detatch process
      args = (open_prog, arg)
      print(subprocess.list2cmdline(args))
      subprocess.Popen(args)