From: Skip Montanaro Date: Tue, 24 Aug 2004 14:26:43 +0000 (+0000) Subject: Keep option parser from gobbling up the filename to be profiled and the X-Git-Tag: v2.4a3~136 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8107ca47ebc79fa9cec8feea69d270f3774da669;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Tools/scripts/hotshotmain.py b/Tools/scripts/hotshotmain.py index 09120562ac15..4f406284bd86 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)