2006-07-11 05:00:13 +02:00
|
|
|
# Copyright (c) 2005 The Regents of The University of Michigan
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions are
|
|
|
|
# met: redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer;
|
|
|
|
# redistributions in binary form must reproduce the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer in the
|
|
|
|
# documentation and/or other materials provided with the distribution;
|
|
|
|
# neither the name of the copyright holders nor the names of its
|
|
|
|
# contributors may be used to endorse or promote products derived from
|
|
|
|
# this software without specific prior written permission.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
#
|
|
|
|
# Authors: Nathan Binkert
|
|
|
|
|
2007-08-02 20:59:02 +02:00
|
|
|
import code
|
|
|
|
import datetime
|
|
|
|
import os
|
|
|
|
import socket
|
|
|
|
import sys
|
|
|
|
|
2006-07-11 05:00:13 +02:00
|
|
|
__all__ = [ 'options', 'arguments', 'main' ]
|
|
|
|
|
2011-05-25 10:32:07 +02:00
|
|
|
usage="%prog [gem5 options] script.py [script options]"
|
2008-06-15 06:15:58 +02:00
|
|
|
version="%prog 2.0"
|
2011-06-03 02:36:07 +02:00
|
|
|
brief_copyright=\
|
|
|
|
"gem5 is copyrighted software; use the --copyright option for details."
|
2006-07-11 05:00:13 +02:00
|
|
|
|
2011-04-15 19:44:59 +02:00
|
|
|
def parse_options():
|
|
|
|
import config
|
|
|
|
from options import OptionParser
|
|
|
|
|
|
|
|
options = OptionParser(usage=usage, version=version,
|
|
|
|
description=brief_copyright)
|
|
|
|
option = options.add_option
|
|
|
|
group = options.set_group
|
|
|
|
|
|
|
|
# Help options
|
|
|
|
option('-B', "--build-info", action="store_true", default=False,
|
|
|
|
help="Show build information")
|
|
|
|
option('-C', "--copyright", action="store_true", default=False,
|
|
|
|
help="Show full copyright information")
|
|
|
|
option('-R', "--readme", action="store_true", default=False,
|
|
|
|
help="Show the readme")
|
|
|
|
|
|
|
|
# Options for configuring the base simulator
|
|
|
|
option('-d', "--outdir", metavar="DIR", default="m5out",
|
|
|
|
help="Set the output directory to DIR [Default: %default]")
|
|
|
|
option('-r', "--redirect-stdout", action="store_true", default=False,
|
|
|
|
help="Redirect stdout (& stderr, without -e) to file")
|
|
|
|
option('-e', "--redirect-stderr", action="store_true", default=False,
|
|
|
|
help="Redirect stderr to file")
|
|
|
|
option("--stdout-file", metavar="FILE", default="simout",
|
|
|
|
help="Filename for -r redirection [Default: %default]")
|
|
|
|
option("--stderr-file", metavar="FILE", default="simerr",
|
|
|
|
help="Filename for -e redirection [Default: %default]")
|
|
|
|
option('-i', "--interactive", action="store_true", default=False,
|
|
|
|
help="Invoke the interactive interpreter after running the script")
|
|
|
|
option("--pdb", action="store_true", default=False,
|
|
|
|
help="Invoke the python debugger before running the script")
|
|
|
|
option('-p', "--path", metavar="PATH[:PATH]", action='append', split=':',
|
|
|
|
help="Prepend PATH to the system path when invoking the script")
|
|
|
|
option('-q', "--quiet", action="count", default=0,
|
|
|
|
help="Reduce verbosity")
|
|
|
|
option('-v', "--verbose", action="count", default=0,
|
|
|
|
help="Increase verbosity")
|
|
|
|
|
|
|
|
# Statistics options
|
|
|
|
group("Statistics Options")
|
|
|
|
option("--stats-file", metavar="FILE", default="stats.txt",
|
|
|
|
help="Sets the output file for statistics [Default: %default]")
|
|
|
|
|
|
|
|
# Configuration Options
|
|
|
|
group("Configuration Options")
|
|
|
|
option("--dump-config", metavar="FILE", default="config.ini",
|
|
|
|
help="Dump configuration output file [Default: %default]")
|
2012-01-10 01:08:20 +01:00
|
|
|
option("--json-config", metavar="FILE", default="config.json",
|
|
|
|
help="Create JSON output of the configuration [Default: %default]")
|
2012-05-11 01:04:27 +02:00
|
|
|
option("--dot-config", metavar="FILE", default="config.dot",
|
|
|
|
help="Create DOT & pdf outputs of the configuration [Default: %default]")
|
2011-04-15 19:44:59 +02:00
|
|
|
|
|
|
|
# Debugging options
|
|
|
|
group("Debugging Options")
|
2016-01-18 03:27:46 +01:00
|
|
|
option("--debug-break", metavar="TICK[,TICK]", action='append', split=',',
|
|
|
|
help="Create breakpoint(s) at TICK(s) " \
|
|
|
|
"(kills process if no debugger attached)")
|
2011-04-15 19:44:59 +02:00
|
|
|
option("--debug-help", action='store_true',
|
2013-11-01 16:56:13 +01:00
|
|
|
help="Print help on debug flags")
|
2011-04-15 19:44:59 +02:00
|
|
|
option("--debug-flags", metavar="FLAG[,FLAG]", action='append', split=',',
|
2013-11-01 16:56:13 +01:00
|
|
|
help="Sets the flags for debug output (-FLAG disables a flag)")
|
2016-01-18 03:27:46 +01:00
|
|
|
option("--debug-start", metavar="TICK", type='int',
|
2016-01-18 04:18:49 +01:00
|
|
|
help="Start debug output at TICK")
|
2013-11-01 16:56:13 +01:00
|
|
|
option("--debug-file", metavar="FILE", default="cout",
|
|
|
|
help="Sets the output file for debug [Default: %default]")
|
|
|
|
option("--debug-ignore", metavar="EXPR", action='append', split=':',
|
|
|
|
help="Ignore EXPR sim objects")
|
2011-04-15 19:44:59 +02:00
|
|
|
option("--remote-gdb-port", type='int', default=7000,
|
|
|
|
help="Remote gdb base port (set to 0 to disable listening)")
|
|
|
|
|
|
|
|
# Help options
|
|
|
|
group("Help Options")
|
|
|
|
option("--list-sim-objects", action='store_true', default=False,
|
|
|
|
help="List all built-in SimObjects, their params and default values")
|
|
|
|
|
|
|
|
# load the options.py config file to allow people to set their own
|
|
|
|
# default options
|
|
|
|
options_file = config.get('options.py')
|
|
|
|
if options_file:
|
|
|
|
scope = { 'options' : options }
|
|
|
|
execfile(options_file, scope)
|
|
|
|
|
|
|
|
arguments = options.parse_args()
|
|
|
|
return options,arguments
|
2009-05-11 20:18:09 +02:00
|
|
|
|
2011-04-13 18:32:18 +02:00
|
|
|
def interact(scope):
|
2011-05-25 10:32:07 +02:00
|
|
|
banner = "gem5 Interactive Console"
|
2013-02-10 13:23:58 +01:00
|
|
|
|
|
|
|
ipshell = None
|
|
|
|
prompt_in1 = "gem5 \\#> "
|
|
|
|
prompt_out = "gem5 \\#: "
|
|
|
|
|
|
|
|
# Is IPython version 0.10 or earlier available?
|
2011-04-13 18:32:18 +02:00
|
|
|
try:
|
|
|
|
from IPython.Shell import IPShellEmbed
|
2013-02-10 13:23:58 +01:00
|
|
|
ipshell = IPShellEmbed(argv=["-prompt_in1", prompt_in1,
|
|
|
|
"-prompt_out", prompt_out],
|
|
|
|
banner=banner, user_ns=scope)
|
2011-04-13 18:32:18 +02:00
|
|
|
except ImportError:
|
2013-02-10 13:23:58 +01:00
|
|
|
pass
|
|
|
|
|
|
|
|
# Is IPython version 0.11 or later available?
|
|
|
|
if not ipshell:
|
|
|
|
try:
|
|
|
|
import IPython
|
|
|
|
from IPython.config.loader import Config
|
|
|
|
from IPython.frontend.terminal.embed import InteractiveShellEmbed
|
|
|
|
|
|
|
|
cfg = Config()
|
|
|
|
cfg.PromptManager.in_template = prompt_in1
|
|
|
|
cfg.PromptManager.out_template = prompt_out
|
|
|
|
ipshell = InteractiveShellEmbed(config=cfg, user_ns=scope,
|
|
|
|
banner1=banner)
|
|
|
|
except ImportError:
|
|
|
|
pass
|
|
|
|
|
|
|
|
if ipshell:
|
|
|
|
ipshell()
|
|
|
|
else:
|
|
|
|
# Use the Python shell in the standard library if IPython
|
|
|
|
# isn't available.
|
2011-04-13 18:32:18 +02:00
|
|
|
code.InteractiveConsole(scope).interact(banner)
|
|
|
|
|
2011-04-15 19:44:59 +02:00
|
|
|
def main(*args):
|
2011-04-21 03:45:03 +02:00
|
|
|
import m5
|
|
|
|
|
2009-01-19 18:59:15 +01:00
|
|
|
import core
|
|
|
|
import debug
|
|
|
|
import defines
|
2007-03-06 20:13:43 +01:00
|
|
|
import event
|
2007-02-09 23:39:56 +01:00
|
|
|
import info
|
2009-01-19 18:59:15 +01:00
|
|
|
import stats
|
2009-01-19 18:59:13 +01:00
|
|
|
import trace
|
|
|
|
|
2011-04-15 19:44:59 +02:00
|
|
|
from util import fatal
|
|
|
|
|
|
|
|
if len(args) == 0:
|
|
|
|
options, arguments = parse_options()
|
|
|
|
elif len(args) == 2:
|
|
|
|
options, arguments = args
|
|
|
|
else:
|
|
|
|
raise TypeError, "main() takes 0 or 2 arguments (%d given)" % len(args)
|
|
|
|
|
2011-04-21 03:45:03 +02:00
|
|
|
m5.options = options
|
|
|
|
|
2009-01-19 18:59:13 +01:00
|
|
|
def check_tracing():
|
|
|
|
if defines.TRACING_ON:
|
|
|
|
return
|
|
|
|
|
2009-01-19 23:43:09 +01:00
|
|
|
fatal("Tracing is not enabled. Compile with TRACING_ON")
|
2006-07-11 05:00:13 +02:00
|
|
|
|
2013-11-25 18:21:00 +01:00
|
|
|
# Set the main event queue for the main thread.
|
|
|
|
event.mainq = event.getEventQueue(0)
|
|
|
|
event.setEventQueue(event.mainq)
|
|
|
|
|
2008-08-04 06:40:31 +02:00
|
|
|
if not os.path.isdir(options.outdir):
|
|
|
|
os.makedirs(options.outdir)
|
|
|
|
|
|
|
|
# These filenames are used only if the redirect_std* options are set
|
|
|
|
stdout_file = os.path.join(options.outdir, options.stdout_file)
|
|
|
|
stderr_file = os.path.join(options.outdir, options.stderr_file)
|
|
|
|
|
|
|
|
# Print redirection notices here before doing any redirection
|
|
|
|
if options.redirect_stdout and not options.redirect_stderr:
|
|
|
|
print "Redirecting stdout and stderr to", stdout_file
|
|
|
|
else:
|
|
|
|
if options.redirect_stdout:
|
|
|
|
print "Redirecting stdout to", stdout_file
|
|
|
|
if options.redirect_stderr:
|
|
|
|
print "Redirecting stderr to", stderr_file
|
|
|
|
|
|
|
|
# Now redirect stdout/stderr as desired
|
|
|
|
if options.redirect_stdout:
|
|
|
|
redir_fd = os.open(stdout_file, os. O_WRONLY | os.O_CREAT | os.O_TRUNC)
|
|
|
|
os.dup2(redir_fd, sys.stdout.fileno())
|
|
|
|
if not options.redirect_stderr:
|
|
|
|
os.dup2(redir_fd, sys.stderr.fileno())
|
|
|
|
|
|
|
|
if options.redirect_stderr:
|
|
|
|
redir_fd = os.open(stderr_file, os. O_WRONLY | os.O_CREAT | os.O_TRUNC)
|
|
|
|
os.dup2(redir_fd, sys.stderr.fileno())
|
|
|
|
|
2006-07-11 05:00:13 +02:00
|
|
|
done = False
|
2007-08-02 20:59:02 +02:00
|
|
|
|
|
|
|
if options.build_info:
|
|
|
|
done = True
|
|
|
|
print 'Build information:'
|
|
|
|
print
|
2009-01-19 18:59:15 +01:00
|
|
|
print 'compiled %s' % defines.compileDate;
|
2007-08-02 20:59:02 +02:00
|
|
|
print 'build options:'
|
2009-01-19 18:59:15 +01:00
|
|
|
keys = defines.buildEnv.keys()
|
2007-08-02 20:59:02 +02:00
|
|
|
keys.sort()
|
|
|
|
for key in keys:
|
2009-01-19 18:59:15 +01:00
|
|
|
val = defines.buildEnv[key]
|
2007-08-02 20:59:02 +02:00
|
|
|
print ' %s = %s' % (key, val)
|
|
|
|
print
|
|
|
|
|
2006-07-11 05:00:13 +02:00
|
|
|
if options.copyright:
|
|
|
|
done = True
|
2011-06-03 02:36:07 +02:00
|
|
|
print info.COPYING
|
2006-07-11 05:00:13 +02:00
|
|
|
print
|
|
|
|
|
|
|
|
if options.readme:
|
|
|
|
done = True
|
|
|
|
print 'Readme:'
|
|
|
|
print
|
|
|
|
print info.README
|
|
|
|
print
|
|
|
|
|
2011-04-15 19:44:32 +02:00
|
|
|
if options.debug_help:
|
2007-02-13 09:16:41 +01:00
|
|
|
done = True
|
2009-01-19 18:59:13 +01:00
|
|
|
check_tracing()
|
2011-04-15 19:44:32 +02:00
|
|
|
debug.help()
|
2007-02-13 09:16:41 +01:00
|
|
|
|
2008-06-15 06:51:08 +02:00
|
|
|
if options.list_sim_objects:
|
|
|
|
import SimObject
|
|
|
|
done = True
|
|
|
|
print "SimObjects:"
|
|
|
|
objects = SimObject.allClasses.keys()
|
|
|
|
objects.sort()
|
|
|
|
for name in objects:
|
|
|
|
obj = SimObject.allClasses[name]
|
|
|
|
print " %s" % obj
|
|
|
|
params = obj._params.keys()
|
|
|
|
params.sort()
|
|
|
|
for pname in params:
|
|
|
|
param = obj._params[pname]
|
|
|
|
default = getattr(param, 'default', '')
|
|
|
|
print " %s" % pname
|
|
|
|
if default:
|
|
|
|
print " default: %s" % default
|
|
|
|
print " desc: %s" % param.desc
|
|
|
|
print
|
|
|
|
print
|
|
|
|
|
2006-07-11 05:00:13 +02:00
|
|
|
if done:
|
|
|
|
sys.exit(0)
|
|
|
|
|
2008-06-15 06:15:58 +02:00
|
|
|
# setting verbose and quiet at the same time doesn't make sense
|
|
|
|
if options.verbose > 0 and options.quiet > 0:
|
|
|
|
options.usage(2)
|
|
|
|
|
|
|
|
verbose = options.verbose - options.quiet
|
2014-03-23 16:11:49 +01:00
|
|
|
if verbose >= 0:
|
2011-06-03 02:36:07 +02:00
|
|
|
print "gem5 Simulator System. http://gem5.org"
|
2006-07-11 05:00:13 +02:00
|
|
|
print brief_copyright
|
|
|
|
print
|
2009-01-19 18:59:15 +01:00
|
|
|
|
2011-05-25 10:32:07 +02:00
|
|
|
print "gem5 compiled %s" % defines.compileDate;
|
2008-06-13 07:09:04 +02:00
|
|
|
|
2011-05-25 10:32:07 +02:00
|
|
|
print "gem5 started %s" % \
|
|
|
|
datetime.datetime.now().strftime("%b %e %Y %X")
|
2015-10-07 02:26:50 +02:00
|
|
|
print "gem5 executing on %s, pid %d" % \
|
|
|
|
(socket.gethostname(), os.getpid())
|
2008-08-04 07:46:46 +02:00
|
|
|
|
2015-03-24 00:14:18 +01:00
|
|
|
# in Python 3 pipes.quote() is moved to shlex.quote()
|
|
|
|
import pipes
|
|
|
|
print "command line:", " ".join(map(pipes.quote, sys.argv))
|
2006-07-27 23:37:28 +02:00
|
|
|
print
|
2006-07-11 05:00:13 +02:00
|
|
|
|
|
|
|
# check to make sure we can find the listed script
|
|
|
|
if not arguments or not os.path.isfile(arguments[0]):
|
2006-07-14 23:53:16 +02:00
|
|
|
if arguments and not os.path.isfile(arguments[0]):
|
|
|
|
print "Script %s not found" % arguments[0]
|
2007-02-13 09:16:41 +01:00
|
|
|
|
2008-06-15 06:15:58 +02:00
|
|
|
options.usage(2)
|
2006-07-11 05:00:13 +02:00
|
|
|
|
|
|
|
# tell C++ about output directory
|
2009-01-19 18:59:15 +01:00
|
|
|
core.setOutputDir(options.outdir)
|
2006-07-11 05:00:13 +02:00
|
|
|
|
|
|
|
# update the system path with elements from the -p option
|
|
|
|
sys.path[0:0] = options.path
|
|
|
|
|
|
|
|
# set stats options
|
2009-01-19 18:59:15 +01:00
|
|
|
stats.initText(options.stats_file)
|
2006-07-11 05:00:13 +02:00
|
|
|
|
|
|
|
# set debugging options
|
2009-01-19 18:59:15 +01:00
|
|
|
debug.setRemoteGDBPort(options.remote_gdb_port)
|
2006-11-13 21:20:08 +01:00
|
|
|
for when in options.debug_break:
|
2013-11-01 16:56:13 +01:00
|
|
|
debug.schedBreak(int(when))
|
2006-07-11 05:00:13 +02:00
|
|
|
|
2011-04-15 19:44:32 +02:00
|
|
|
if options.debug_flags:
|
2009-01-19 18:59:13 +01:00
|
|
|
check_tracing()
|
2008-10-06 18:31:51 +02:00
|
|
|
|
|
|
|
on_flags = []
|
|
|
|
off_flags = []
|
2011-04-15 19:44:32 +02:00
|
|
|
for flag in options.debug_flags:
|
2008-10-06 18:31:51 +02:00
|
|
|
off = False
|
|
|
|
if flag.startswith('-'):
|
|
|
|
flag = flag[1:]
|
|
|
|
off = True
|
2011-04-15 19:44:32 +02:00
|
|
|
|
|
|
|
if flag not in debug.flags:
|
|
|
|
print >>sys.stderr, "invalid debug flag '%s'" % flag
|
2008-10-06 18:31:51 +02:00
|
|
|
sys.exit(1)
|
2007-02-13 09:16:41 +01:00
|
|
|
|
2008-10-06 18:31:51 +02:00
|
|
|
if off:
|
2011-04-15 19:44:32 +02:00
|
|
|
debug.flags[flag].disable()
|
2008-10-06 18:31:51 +02:00
|
|
|
else:
|
2011-04-15 19:44:32 +02:00
|
|
|
debug.flags[flag].enable()
|
2007-02-13 09:16:41 +01:00
|
|
|
|
2013-11-01 16:56:13 +01:00
|
|
|
if options.debug_start:
|
2009-01-19 18:59:13 +01:00
|
|
|
check_tracing()
|
2013-11-01 16:56:13 +01:00
|
|
|
e = event.create(trace.enable, event.Event.Debug_Enable_Pri)
|
|
|
|
event.mainq.schedule(e, options.debug_start)
|
2007-02-18 05:32:39 +01:00
|
|
|
else:
|
2009-01-19 18:59:13 +01:00
|
|
|
trace.enable()
|
2007-02-09 23:39:56 +01:00
|
|
|
|
2013-11-01 16:56:13 +01:00
|
|
|
trace.output(options.debug_file)
|
2007-02-09 23:39:56 +01:00
|
|
|
|
2013-11-01 16:56:13 +01:00
|
|
|
for ignore in options.debug_ignore:
|
2009-01-19 18:59:13 +01:00
|
|
|
check_tracing()
|
|
|
|
trace.ignore(ignore)
|
2006-07-11 05:00:13 +02:00
|
|
|
|
|
|
|
sys.argv = arguments
|
|
|
|
sys.path = [ os.path.dirname(sys.argv[0]) ] + sys.path
|
2006-07-12 21:18:49 +02:00
|
|
|
|
2008-10-09 13:58:23 +02:00
|
|
|
filename = sys.argv[0]
|
|
|
|
filedata = file(filename, 'r').read()
|
|
|
|
filecode = compile(filedata, filename, 'exec')
|
|
|
|
scope = { '__file__' : filename,
|
2007-01-03 19:16:22 +01:00
|
|
|
'__name__' : '__m5_main__' }
|
2006-07-12 21:21:23 +02:00
|
|
|
|
|
|
|
# we want readline if we're doing anything interactive
|
|
|
|
if options.interactive or options.pdb:
|
2007-02-09 23:39:56 +01:00
|
|
|
exec "import readline" in scope
|
2006-07-12 21:21:23 +02:00
|
|
|
|
|
|
|
# if pdb was requested, execfile the thing under pdb, otherwise,
|
|
|
|
# just do the execfile normally
|
|
|
|
if options.pdb:
|
2008-10-09 13:58:23 +02:00
|
|
|
import pdb
|
|
|
|
import traceback
|
|
|
|
|
|
|
|
pdb = pdb.Pdb()
|
|
|
|
try:
|
|
|
|
pdb.run(filecode, scope)
|
|
|
|
except SystemExit:
|
|
|
|
print "The program exited via sys.exit(). Exit status: ",
|
|
|
|
print sys.exc_info()[1]
|
|
|
|
except:
|
|
|
|
traceback.print_exc()
|
|
|
|
print "Uncaught exception. Entering post mortem debugging"
|
|
|
|
t = sys.exc_info()[2]
|
|
|
|
while t.tb_next is not None:
|
|
|
|
t = t.tb_next
|
|
|
|
pdb.interaction(t.tb_frame,t)
|
2006-07-12 21:21:23 +02:00
|
|
|
else:
|
2008-10-09 13:58:23 +02:00
|
|
|
exec filecode in scope
|
2006-07-11 05:00:13 +02:00
|
|
|
|
|
|
|
# once the script is done
|
|
|
|
if options.interactive:
|
2011-04-13 18:32:18 +02:00
|
|
|
interact(scope)
|
2006-07-11 05:00:13 +02:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
from pprint import pprint
|
|
|
|
|
2011-04-15 19:44:59 +02:00
|
|
|
options, arguments = parse_options()
|
|
|
|
|
2006-07-11 05:00:13 +02:00
|
|
|
print 'opts:'
|
|
|
|
pprint(options, indent=4)
|
|
|
|
print
|
|
|
|
|
|
|
|
print 'args:'
|
|
|
|
pprint(arguments, indent=4)
|