Skip to content

Commit 51f986d

Browse files
committed
FIX: Cleaner arg parsing
1 parent 308eef4 commit 51f986d

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

bin/pysurfer

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ if __name__ == '__main__':
6868
argdict = args.__dict__
6969
config_opts = dict([(k, v) for k, v in argdict.items()
7070
if k in confkeys and v])
71-
if 'views' in argdict.keys():
72-
views = argdict['views'].split(',')
73-
else:
74-
views = 'lat'
71+
views = argdict['views']
7572

7673
# Load up the figure and underlying brain object
7774
b = Brain(args.subject_id, args.hemi, args.surf, args.curv,

surfer/_commandline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,5 @@
6767
help="colormap for binary cortex curvature")
6868
parser.add_argument("-title",
6969
help="title to use for the figure")
70-
parser.add_argument("-views",
71-
help="view list (comma-separated) to use")
70+
parser.add_argument("-views", nargs="*", default=['lat'],
71+
help="view list (space-separated) to use")

0 commit comments

Comments
 (0)