main.py (2908:40f7a0a75c1a) main.py (2922:654ef3d30b61)
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 168 unchanged lines hidden (view full) ---

177 help="Print fetch sequence numbers in trace output")
178bool_option("print-cpseq", default=False,
179 help="Print correct path sequence numbers in trace output")
180
181options = attrdict()
182arguments = []
183
184def usage(exitcode=None):
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 168 unchanged lines hidden (view full) ---

177 help="Print fetch sequence numbers in trace output")
178bool_option("print-cpseq", default=False,
179 help="Print correct path sequence numbers in trace output")
180
181options = attrdict()
182arguments = []
183
184def usage(exitcode=None):
185 parser.print_help()
185 print parser.help
186 if exitcode is not None:
187 sys.exit(exitcode)
188
189def parse_args():
190 _opts,args = parser.parse_args()
191 opts = attrdict(_opts.__dict__)
192
193 # setting verbose and quiet at the same time doesn't make sense

--- 50 unchanged lines hidden (view full) ---

244 print brief_copyright
245 print
246 print "M5 compiled %s" % cc_main.cvar.compileDate;
247 print "M5 started %s" % datetime.now().ctime()
248 print "M5 executing on %s" % socket.gethostname()
249
250 # check to make sure we can find the listed script
251 if not arguments or not os.path.isfile(arguments[0]):
186 if exitcode is not None:
187 sys.exit(exitcode)
188
189def parse_args():
190 _opts,args = parser.parse_args()
191 opts = attrdict(_opts.__dict__)
192
193 # setting verbose and quiet at the same time doesn't make sense

--- 50 unchanged lines hidden (view full) ---

244 print brief_copyright
245 print
246 print "M5 compiled %s" % cc_main.cvar.compileDate;
247 print "M5 started %s" % datetime.now().ctime()
248 print "M5 executing on %s" % socket.gethostname()
249
250 # check to make sure we can find the listed script
251 if not arguments or not os.path.isfile(arguments[0]):
252 if arguments and not os.path.isfile(arguments[0]):
253 print "Script %s not found" % arguments[0]
252 usage(2)
253
254 # tell C++ about output directory
255 cc_main.setOutputDir(options.outdir)
256
257 # update the system path with elements from the -p option
258 sys.path[0:0] = options.path
259

--- 62 unchanged lines hidden ---
254 usage(2)
255
256 # tell C++ about output directory
257 cc_main.setOutputDir(options.outdir)
258
259 # update the system path with elements from the -p option
260 sys.path[0:0] = options.path
261

--- 62 unchanged lines hidden ---