code: def view_directory(dname=None, fname=None, verbose=True):
      from utool.util_arg import STRICT
      from utool.util_path import checkpath
      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
      args = (open_prog, arg)
      print(subprocess.list2cmdline(args))
      subprocess.Popen(args)