Skip to content

Commit

Permalink
Add GUI script for use in FSL environment
Browse files Browse the repository at this point in the history
  • Loading branch information
mcraig-ibme committed Jan 18, 2019
1 parent 7a3127c commit 7aa64e7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions asl_gui_fsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env fslpython

# Use modules in the same dir as wrapper script if present, then default
# to FSL modules
import sys, os
for d in [os.environ.get("FSLDIR", None),
os.environ.get("FSLDEVDIR", None, ),
os.path.dirname(os.path.abspath(sys.argv[0]))]:
if d:
sys.path.insert(0, os.path.join(d, "python"))

from asl.gui import main
try:
main()
except RuntimeError as e:
print("Error: %s" % e)

0 comments on commit 7aa64e7

Please sign in to comment.