]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Keep option parser from gobbling up the filename to be profiled and the
authorSkip Montanaro <skip@pobox.com>
Tue, 24 Aug 2004 14:26:43 +0000 (14:26 +0000)
committerSkip Montanaro <skip@pobox.com>
Tue, 24 Aug 2004 14:26:43 +0000 (14:26 +0000)
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.

Tools/scripts/hotshotmain.py

index 09120562ac15b17ee59b0258cf136462cedc601f..4f406284bd86592c525e65c3115de1d80e6a82dc 100644 (file)
@@ -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)