diff --git a/pyproject.toml b/pyproject.toml index 8cb5e5f..1041e4c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "rda_python_common" -version = "1.0.13" +version = "1.0.14" authors = [ { name="Zaihua Ji", email="zji@ucar.edu" }, ] diff --git a/src/rda_python_common/PgLOG.py b/src/rda_python_common/PgLOG.py index e02cb24..72363a4 100644 --- a/src/rda_python_common/PgLOG.py +++ b/src/rda_python_common/PgLOG.py @@ -541,6 +541,13 @@ def pgtrim(line, rmcmt = 1): return line +# +# set PGLOG['PUSGDIR'] from the program file with full path +# +def set_help_path(progfile): + + PGLOG['PUSGDIR'] = op.dirname(op.abspath(progfile)) + # # Function: show_usage(progname: Perl program name to get file "progname.usg") # @@ -549,7 +556,8 @@ def pgtrim(line, rmcmt = 1): # def show_usage(progname, opts = None): - usgname = PGLOG['PUSGDIR'] + '/' + progname + '.usg' + usgname = join_paths(PGLOG['PUSGDIR'], progname + '.usg') + if opts: # show usage for individual option of dsarch for opt in opts: