original_docstring:  Show file in file manager. 
docstring: Show file in file manager.
docstring_tokens: Show file in file manager .
code: def open_in_file_manager(file_path: Path):
      """ Show file in file manager. """
      if platform.system() == "Linux":
          # no standardized select functionailty.
          # However xdg-open on a dir will open the folder in the default file explorer.
          dir_to_view = file_path.parent if file_path.is_file() else file_path
          return subprocess.Popen(("xdg-open", str(dir_to_view)))
      elif platform.system() == "Windows":
          # select switch for highlighting
          creationflags = 0
          if version.StrictVersion(platform.python_version()) >= version.StrictVersion("3.7.0"):
              creationflags = subprocess.CREATE_NO_WINDOW # available since 3.7
          return subprocess.Popen("explorer /select," + str(file_path), creationflags=creationflags)
code_tokens: def open_in_file_manager ( file_path : Path ) : if platform . system ( ) == "Linux" : dir_to_view = file_path . parent if file_path . is_file ( ) else file_path return subprocess . Popen ( ( "xdg-open" , str ( dir_to_view ) ) ) elif platform . system ( ) == "Windows" : creationflags = 0 if version . StrictVersion ( platform . python_version ( ) ) >= version . StrictVersion ( "3.7.0" ) : creationflags = subprocess . CREATE_NO_WINDOW return subprocess . Popen ( "explorer /select," + str ( file_path ) , creationflags = creationflags )
short_docstring: Show file in file manager.
short_docstring_tokens: Show file in file manager .
comment: """ Show file in file manager. """$SEP$# no standardized select functionailty.
  $SEP$# However xdg-open on a dir will open the folder in the default file explorer.
  $SEP$# select switch for highlighting
  $SEP$# available since 3.7
  