diff --git a/scalene/scalene_parseargs.py b/scalene/scalene_parseargs.py index 621246f49..a41351450 100644 --- a/scalene/scalene_parseargs.py +++ b/scalene/scalene_parseargs.py @@ -1,5 +1,6 @@ import argparse import contextlib +import os import sys from textwrap import dedent from typing import Any, List, NoReturn, Optional, Tuple @@ -7,7 +8,7 @@ from scalene.scalene_arguments import ScaleneArguments from scalene.scalene_version import scalene_version, scalene_date -scalene_gui_url = "https://plasma-umass.org/scalene-gui/" +scalene_gui_url = f'file:{os.path.join(os.path.dirname(__file__), "scalene-gui", "index.html")}' class RichArgParser(argparse.ArgumentParser): @@ -46,7 +47,7 @@ def parse_args() -> Tuple[argparse.Namespace, List[str]]: sys._exit = ScaleneParseArgs.clean_exit # type: ignore defaults = ScaleneArguments() usage = dedent( - f"""[b]Scalene[/b]: a high-precision CPU and memory profiler, version {scalene_version} ({scalene_date}) + rf"""[b]Scalene[/b]: a high-precision CPU and memory profiler, version {scalene_version} ({scalene_date}) [link=https://github.com/plasma-umass/scalene]https://github.com/plasma-umass/scalene[/link] @@ -155,7 +156,7 @@ def parse_args() -> Tuple[argparse.Namespace, List[str]]: action="store_const", const=True, default=False, - help=f"only opens the web UI ({scalene_gui_url})", + help=f"opens the Scalene web UI and exits.", ) parser.add_argument( "--reduced-profile",