summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2004-08-24 14:26:43 (GMT)
committerSkip Montanaro <skip@pobox.com>2004-08-24 14:26:43 (GMT)
commit8107ca47ebc79fa9cec8feea69d270f3774da669 (patch)
treefa8e0d3ace792e627afdb81a377a4060019791b1
parentfb154171c4ace44dec817a3e52a0b83bbbb0f4f5 (diff)
downloadcpython-8107ca47ebc79fa9cec8feea69d270f3774da669.zip
cpython-8107ca47ebc79fa9cec8feea69d270f3774da669.tar.gz
cpython-8107ca47ebc79fa9cec8feea69d270f3774da669.tar.bz2
Keep option parser from gobbling up the filename to be profiled and the
flags it accepts. It's too late to change optparse's default behavior now, but I find the default setting of allow_interspersed_args very weird.
-rw-r--r--Tools/scripts/hotshotmain.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Tools/scripts/hotshotmain.py b/Tools/scripts/hotshotmain.py
index 0912056..4f40628 100644
--- a/Tools/scripts/hotshotmain.py
+++ b/Tools/scripts/hotshotmain.py
@@ -39,6 +39,7 @@ def run_hotshot(filename, profile, args):
def main(args):
parser = optparse.OptionParser(__doc__)
+ parser.disable_interspersed_args()
parser.add_option("-p", "--profile", action="store", default=PROFILE,
dest="profile", help='Specify profile file to use')
(options, args) = parser.parse_args(args)