From 51f308f3ce4b2cb94fc04f6bec4bbef7aa4e5f7c Mon Sep 17 00:00:00 2001 From: Max Rakitin Date: Mon, 19 Feb 2024 14:24:33 -0500 Subject: [PATCH] Fix CLI interface to accept relative file paths --- src/nexpy/nexpygui.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nexpy/nexpygui.py b/src/nexpy/nexpygui.py index e2bef269..cff2660e 100755 --- a/src/nexpy/nexpygui.py +++ b/src/nexpy/nexpygui.py @@ -7,6 +7,7 @@ # The full license is in the file COPYING, distributed with this software. # ----------------------------------------------------------------------------- import argparse +import os import sys import nexpy @@ -26,6 +27,9 @@ def main(): help='enable faulthandler for system crashes') args, extra_args = parser.parse_known_args() + for i, f in enumerate(args.filenames): + args.filenames[i] = os.path.abspath(os.path.expanduser(f)) + if sys.platform == 'darwin': from nexpy.gui.utils import run_pythonw run_pythonw(__file__)