Skip to content

Commit

Permalink
Merge pull request nexpy#426 from mrakitin/cli-fix-rel-paths-to-files
Browse files Browse the repository at this point in the history
Fix CLI interface to accept relative file paths
  • Loading branch information
rayosborn authored Feb 20, 2024
2 parents fd827c8 + 51f308f commit e80876f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/nexpy/nexpygui.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# The full license is in the file COPYING, distributed with this software.
# -----------------------------------------------------------------------------
import argparse
import os
import sys

import nexpy
Expand All @@ -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__)
Expand Down

0 comments on commit e80876f

Please sign in to comment.