()
webbrowser_register_explorer registers `explorer.exe` in the list of browsers under Windows Subsystem for Linux.

    See https://github.com/online-judge-tools/oj/issues/773
webbrowser_register_explorer registers `explorer.exe` in the list of browsers under Windows Subsystem for Linux.
webbrowser_register_explorer registers explorer . exe in the list of browsers under Windows Subsystem for Linux .
def webbrowser_register_explorer_exe() -> None:
    """webbrowser_register_explorer registers `explorer.exe` in the list of browsers under Windows Subsystem for Linux.

    See https://github.com/online-judge-tools/oj/issues/773
    """

    # There is an issue that the terminal is cleared after `.open_new_tab()`. The reason is unknown, but adding an argurment `preferred=True` to `webbrowser.register` resolves this issues.

    # See https://github.com/online-judge-tools/oj/pull/784

    if not is_windows_subsystem_for_linux():
        return
    instance = webbrowser.GenericBrowser('explorer.exe')
    if sys.version_info < (3, 7):
        webbrowser.register('explorer', None, instance)  # TODO: remove this after Python 3.6 supprot is finished
    else:
        webbrowser.register('explorer', None, instance, preferred=True)
def webbrowser_register_explorer_exe ( ) -> None : # There is an issue that the terminal is cleared after `.open_new_tab()`. The reason is unknown, but adding an argurment `preferred=True` to `webbrowser.register` resolves this issues. # See https://github.com/online-judge-tools/oj/pull/784 if not is_windows_subsystem_for_linux ( ) : return instance = webbrowser . GenericBrowser ( 'explorer.exe' ) if sys . version_info < ( 3 , 7 ) : webbrowser . register ( 'explorer' , None , instance ) # TODO: remove this after Python 3.6 supprot is finished else : webbrowser . register ( 'explorer' , None , instance , preferred = True )