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.
This commit is contained in:
Skip Montanaro 2004-08-24 14:26:43 +00:00
parent fb154171c4
commit 8107ca47eb
1 changed files with 1 additions and 0 deletions

View 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)