[yt-svn] commit/yt: MatthewTurk: Add ability to specify filenames on the command line for reason. i.e.,
Bitbucket
commits-noreply at bitbucket.org
Wed May 23 20:32:09 PDT 2012
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/changeset/d9fd498edfe2/
changeset: d9fd498edfe2
branch: yt
user: MatthewTurk
date: 2012-05-24 05:31:44
summary: Add ability to specify filenames on the command line for reason. i.e.,
yt serve -o DD000*/DD000*.hierarchy
affected #: 1 file
diff -r 271456ace2d6c25a1ee3363ef7ac28fb420ead16 -r d9fd498edfe2b42e4c6fc062106014352e527736 yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -82,11 +82,15 @@
if cls.npfs > 1:
self(args)
else:
- if len(getattr(args, "pf", [])) > 1:
+ pf_args = getattr(args, "pf", [])
+ if len(pf_args) > 1:
pfs = args.pf
for pf in pfs:
args.pf = pf
self(args)
+ elif len(pf_args) == 0:
+ pfs = []
+ self(args)
else:
args.pf = getattr(args, 'pf', [None])[0]
self(args)
@@ -105,6 +109,8 @@
_common_options = dict(
pf = dict(short="pf", action=GetParameterFiles,
nargs="+", help="Parameter files to run on"),
+ opf = dict(action=GetParameterFiles, dest="pf",
+ nargs="*", help="(Optional) Parameter files to run on"),
axis = dict(short="-a", long="--axis",
action="store", type=int,
dest="axis", default=4,
@@ -1269,7 +1275,8 @@
help="At startup, find all *.hierarchy files in the CWD"),
dict(short="-d", long="--debug", action="store_true",
default = False, dest="debug",
- help="Add a debugging mode for cell execution")
+ help="Add a debugging mode for cell execution"),
+ "opf"
)
description = \
"""
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list