[Python-checkins] python/dist/src/Tools/scripts hotshotmain.py, 1.1, 1.2

montanaro at users.sourceforge.net montanaro at users.sourceforge.net
Tue Aug 24 16:26:46 CEST 2004


Update of /cvsroot/python/python/dist/src/Tools/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21902

Modified Files:
	hotshotmain.py 
Log Message:
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.


Index: hotshotmain.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/hotshotmain.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- hotshotmain.py	26 Jan 2004 19:44:48 -0000	1.1
+++ hotshotmain.py	24 Aug 2004 14:26:43 -0000	1.2
@@ -39,6 +39,7 @@
 
 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)



More information about the Python-checkins mailing list