Python pprint 模块,PrettyPrinter() 实例源码

我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用pprint.PrettyPrinter()

项目:orca    作者:bdastur    | 项目源码 | 文件源码
def display_ec2_tags(self, outputformat='json',
                         filter=None, aggr_and=False):
        '''
        Display Tags for all EC2 Resources
        '''
        ec2_client = aws_service.AwsService('ec2')
        tagsobj = ec2_client.service.list_tags()

        if filter is not None:
            tagsobj = orcautils.filter_dict(tagsobj,
                                            filter,
                                            aggr_and=aggr_and)

        if outputformat == "json":
            pprinter = pprint.PrettyPrinter()
            pprinter.pprint(tagsobj)
        else:
            self.display_ec2_tags_table(tagsobj)
项目:orca    作者:bdastur    | 项目源码 | 文件源码
def display_s3_bucketlist(self, outputformat='json',
                              filter=None, output_fields=None,
                              aggr_and=False):
        '''
        Display the List of S3 buckets
        '''
        service_client = aws_service.AwsService('s3')
        bucketlist = service_client.service.list_buckets_fast()
        newbucketlist = service_client.service.populate_bucket_fast("location",
                                                                    bucketlist)
        newbucketlist = service_client.service.populate_bucket_fast(
            "objects",
            newbucketlist)
        if filter is not None:
            newbucketlist = orcautils.filter_list(newbucketlist,
                                                  filter,
                                                  aggr_and=aggr_and)

        if outputformat == "json":
            pprinter = pprint.PrettyPrinter()
            pprinter.pprint(newbucketlist)
        else:
            self.display_s3_buckelist_table(newbucketlist)
项目:orca    作者:bdastur    | 项目源码 | 文件源码
def display_s3_bucket_validations(self, outputformat='json'):
        '''
        Display the list of S3 buckets and the validation results.
        '''
        s3client = aws_service.AwsService('s3')
        bucketlist = s3client.service.list_buckets()
        #s3client.service.populate_bucket_tagging(bucketlist)
        #s3client.service.populate_bucket_validation(bucketlist)
        newbucketlist = s3client.service.populate_bucket_fast("tagging",
                                                              bucketlist)
        newbucketlist = s3client.service.populate_bucket_fast("validation",
                                                              newbucketlist)

        if outputformat == "json":
            pprinter = pprint.PrettyPrinter()
            pprinter.pprint(newbucketlist)
        else:
            self.display_s3_bucket_validations_table(newbucketlist)
项目:pycma    作者:CMA-ES    | 项目源码 | 文件源码
def pprint(to_be_printed):
    """nicely formated print"""
    try:
        import pprint as pp
        # generate an instance PrettyPrinter
        # pp.PrettyPrinter().pprint(to_be_printed)
        pp.pprint(to_be_printed)
    except ImportError:
        if isinstance(to_be_printed, dict):
            print('{')
            for k, v in to_be_printed.items():
                print("'" + k + "'" if str(k) == k else k,
                      ': ',
                      "'" + v + "'" if str(v) == v else v,
                      sep="")
            print('}')
        else:
            print('could not import pprint module, appling regular print')
            print(to_be_printed)

# todo: this should rather be a class instance
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def print_progress_bar(progress_array, iteration, prefix='', suffix='', bar_length=100):
    """
    Prints a progress bar
    """
    str_format = "{0:.1f}"
    total = len(progress_array)
    percents = str_format.format(100 * (iteration / float(total)))
    fill_length = int(round(bar_length / float(total)))
    bar_symbol = ''
    for idx, pos in enumerate(progress_array):

        if idx == iteration:
            bar_symbol += (PrettyPrinter.yellow(u'?') * fill_length)
        elif pos is None:
            bar_symbol += ('-' * fill_length)
        elif pos:
            bar_symbol += (PrettyPrinter.green(u'?') * fill_length)
        else:
            bar_symbol += (PrettyPrinter.red(u'?') * fill_length)

    # pylint: disable=W0106
    sys.stdout.write(u'\x1b[2K\r{} |{}| {}{} {}\n'
                     .format(prefix, bar_symbol, percents, '%', suffix)),
    sys.stdout.flush()
项目:filestack-cli    作者:filestack    | 项目源码 | 文件源码
def list_apps(ctx):

    environment = ctx.parent.params['environment']
    config_parser = configparser.ConfigParser()
    config_parser.read(CONFIG_PATH)

    if sys.version_info[0] < 3 and environment.lower() == 'default':
        environment = configparser.DEFAULTSECT

    client_id = config_parser.get(environment, 'client_id')
    client_secret = config_parser.get(environment, 'client_secret')

    response = management_utils.list_apps((client_id, client_secret))

    if response.ok:
        app_data = response.json()
    else:
        click.echo(response.text)

    printer = pprint.PrettyPrinter(indent=4)
    printer.pprint(app_data)
项目:Tuxemon-Server    作者:Tuxemon    | 项目源码 | 文件源码
def __init__(self, app):

        # Initiate the parent class
        cmd.Cmd.__init__(self)

        # Set up the command line prompt itself
        self.prompt = "Tuxemon>> "
        self.intro = 'Tuxemon CLI\nType "help", "copyright", "credits" or "license" for more information.'

        # Import pretty print so that shit is formatted nicely
        import pprint
        self.pp = pprint.PrettyPrinter(indent=4)

        # Import threading to start the CLI in a separate thread
        from threading import Thread

        self.app = app
        self.cmd_thread = Thread(target=self.cmdloop)
        self.cmd_thread.daemon = True
        self.cmd_thread.start()
项目:django-livesettings3    作者:kunaldeo    | 项目源码 | 文件源码
def export_as_python(request):
    """Export site settings as a dictionary of dictionaries"""

    from livesettings.models import Setting, LongSetting
    import pprint

    work = {}
    both = list(Setting.objects.all())
    both.extend(list(LongSetting.objects.all()))

    for s in both:
        sitesettings = work.setdefault(s.site.id, {'DB': False, 'SETTINGS': {}})['SETTINGS']
        sitegroup = sitesettings.setdefault(s.group, {})
        sitegroup[s.key] = s.value

    pp = pprint.PrettyPrinter(indent=4)
    pretty = pp.pformat(work)

    return render(request, 'livesettings/text.txt', {'text': pretty}, content_type='text/plain')


# Required permission `is_superuser` is equivalent to auth.change_user,
# because who can modify users, can easy became a superuser.
项目:spotifyt    作者:luastan    | 项目源码 | 文件源码
def load_structure(raw_data):
    pp = pprint.PrettyPrinter(indent=4)
    #pp.pprint(raw_data[0]); exit(0)
    #
    print('Stracting from Spotify')
    for raw_song_data in raw_data:
        song_details = {}
        song_details['title'] = raw_song_data['track']['name']

        artists = ''
        for saltimbanqui in raw_song_data['track']['artists']:
            artists = artists + saltimbanqui['name'] + " " 
        song_details['artist'] = artists

        try:
            album_pic = raw_song_data['track']['album']['images'][0]['url']
            song_details['album_pic'] = album_pic
        except:
            break

        songs_to_dl.append(song_details)
项目:third_person_im    作者:bstadie    | 项目源码 | 文件源码
def pprint(to_be_printed):
    """nicely formated print"""
    try:
        import pprint as pp
        # generate an instance PrettyPrinter
        # pp.PrettyPrinter().pprint(to_be_printed)
        pp.pprint(to_be_printed)
    except ImportError:
        if isinstance(to_be_printed, dict):
            print('{')
            for k, v in list(to_be_printed.items()):
                print("'" + k + "'" if isinstance(k, str) else k,
                      ': ',
                      "'" + v + "'" if isinstance(k, str) else v,
                      sep="")
            print('}')
        else:
            print('could not import pprint module, appling regular print')
            print(to_be_printed)
项目:pov_fuzzing    作者:mechaphish    | 项目源码 | 文件源码
def main():
    """
    A sample usage of ids_parser()
    """

    import pprint
    printer = pprint.PrettyPrinter(indent=4)
    parser = ids_parser()
    rules = []
    with open(sys.argv[1], 'r') as rules_fh:
        for line in rules_fh.readlines():
            try:
                result = parser.parse(line)
            except SyntaxError as error:
                print "invalid rule, %s : original rule: %s" % (error,
                                                                repr(line))
            if len(result):
                rules.append(result)

    printer.pprint(rules)
项目:rllabplusplus    作者:shaneshixiang    | 项目源码 | 文件源码
def pprint(to_be_printed):
    """nicely formated print"""
    try:
        import pprint as pp
        # generate an instance PrettyPrinter
        # pp.PrettyPrinter().pprint(to_be_printed)
        pp.pprint(to_be_printed)
    except ImportError:
        if isinstance(to_be_printed, dict):
            print('{')
            for k, v in list(to_be_printed.items()):
                print("'" + k + "'" if isinstance(k, str) else k,
                      ': ',
                      "'" + v + "'" if isinstance(k, str) else v,
                      sep="")
            print('}')
        else:
            print('could not import pprint module, appling regular print')
            print(to_be_printed)
项目:hangoutsbot    作者:das7pad    | 项目源码 | 文件源码
def tagindexdump(bot, _event, *_args):
    """dump raw contents of tags indices"""
    printer = pprint.PrettyPrinter(indent=2)
    printer.pprint(bot.tags.indices)

    chunks = []
    for relationship in bot.tags.indices:
        lines = [_("index: <b><i>{}</i></b>").format(relationship)]
        for key, items in bot.tags.indices[relationship].items():
            lines.append(_("key: <i>{}</i>").format(key))
            for item in items:
                lines.append("... <i>{}</i>".format(item))
        if not lines:
            continue
        chunks.append("\n".join(lines))

    if not chunks:
        chunks = [_("<b>no entries to list</b>")]

    return "\n\n".join(chunks)
项目:ti-data-samples    作者:bom4v    | 项目源码 | 文件源码
def extract_details_from_nrt (nrt_struct):
    """
    Extract some details of call events
    """
    # DEBUG
    # print (nrt_struct.prettyPrint())

    # Translate the NRT structure into a Python one
    py_nrt = py_encode (nrt_struct)

    # DEBUG
    # pp = pprint.PrettyPrinter (indent = 2)
    # pp.pprint (py_nrt)

    #
    return py_nrt
项目:cma    作者:hardmaru    | 项目源码 | 文件源码
def pprint(to_be_printed):
    """nicely formated print"""
    try:
        import pprint as pp
        # generate an instance PrettyPrinter
        # pp.PrettyPrinter().pprint(to_be_printed)
        pp.pprint(to_be_printed)
    except ImportError:
        if isinstance(to_be_printed, dict):
            print('{')
            for k, v in to_be_printed.items():
                print("'" + k + "'" if isinstance(k, basestring) else k,
                      ': ',
                      "'" + v + "'" if isinstance(k, basestring) else v,
                      sep="")
            print('}')
        else:
            print('could not import pprint module, appling regular print')
            print(to_be_printed)
项目:oil    作者:oilshell    | 项目源码 | 文件源码
def test_basic(self):
        # Verify .isrecursive() and .isreadable() w/o recursion
        pp = pprint.PrettyPrinter()
        for safe in (2, 2.0, 2j, "abc", [3], (2,2), {3: 3}, uni("yaddayadda"),
                     bytearray(b"ghi"), True, False, None,
                     self.a, self.b):
            # module-level convenience functions
            self.assertFalse(pprint.isrecursive(safe),
                             "expected not isrecursive for %r" % (safe,))
            self.assertTrue(pprint.isreadable(safe),
                            "expected isreadable for %r" % (safe,))
            # PrettyPrinter methods
            self.assertFalse(pp.isrecursive(safe),
                             "expected not isrecursive for %r" % (safe,))
            self.assertTrue(pp.isreadable(safe),
                            "expected isreadable for %r" % (safe,))
项目:python2-tracer    作者:extremecoders-re    | 项目源码 | 文件源码
def test_basic(self):
        # Verify .isrecursive() and .isreadable() w/o recursion
        pp = pprint.PrettyPrinter()
        for safe in (2, 2.0, 2j, "abc", [3], (2,2), {3: 3}, uni("yaddayadda"),
                     bytearray(b"ghi"), True, False, None,
                     self.a, self.b):
            # module-level convenience functions
            self.assertFalse(pprint.isrecursive(safe),
                             "expected not isrecursive for %r" % (safe,))
            self.assertTrue(pprint.isreadable(safe),
                            "expected isreadable for %r" % (safe,))
            # PrettyPrinter methods
            self.assertFalse(pp.isrecursive(safe),
                             "expected not isrecursive for %r" % (safe,))
            self.assertTrue(pp.isreadable(safe),
                            "expected isreadable for %r" % (safe,))
项目:StatisKit    作者:StatisKit    | 项目源码 | 文件源码
def Dump(self, key = None):
        """
        Using the standard Python pretty printer, return the contents of the
        scons build environment as a string.

        If the key passed in is anything other than None, then that will
        be used as an index into the build environment dictionary and
        whatever is found there will be fed into the pretty printer. Note
        that this key is case sensitive.
        """
        import pprint
        pp = pprint.PrettyPrinter(indent=2)
        if key:
            dict = self.Dictionary(key)
        else:
            dict = self.Dictionary()
        return pp.pformat(dict)
项目:Causality    作者:vcla    | 项目源码 | 文件源码
def import_summerdata(exampleName,actionDirectory):
    import parsingSummerActionAndFluentOutput
    fluent_parses = parsingSummerActionAndFluentOutput.readFluentResults(exampleName)
    action_parses = parsingSummerActionAndFluentOutput.readActionResults("{}.{}".format(actionDirectory,exampleName))
    #import pprint
    #pp = pprint.PrettyPrinter(depth=6)
    #pp.pprint(action_parses)
    #pp.pprint(fluent_parses)
    return [fluent_parses, action_parses]
项目:orca    作者:bdastur    | 项目源码 | 文件源码
def display_ec2_vmlist(self, outputformat='json'):
        '''
        Display the List of EC2 buckets
        '''
        service_client = aws_service.AwsService('ec2')
        vmlist = service_client.service.list_vms()

        if outputformat == "json":
            pprinter = pprint.PrettyPrinter()
            pprinter.pprint(vmlist)
        else:
            self.display_ec2_vmlist_table(vmlist)
项目:orca    作者:bdastur    | 项目源码 | 文件源码
def display_ec2_nw_interfaces(self, outputformat="json"):
        '''
        Display network interfaces
        '''
        ec2_client = aws_service.AwsService('ec2')
        nw_interfaces = ec2_client.service.list_network_interfaces()

        if outputformat == "json":
            pprinter = pprint.PrettyPrinter()
            pprinter.pprint(nw_interfaces)
        else:
            self.display_ec2_nw_interfaces_table(nw_interfaces)
项目:orca    作者:bdastur    | 项目源码 | 文件源码
def display_iam_userlist(self, outputformat='json'):
        '''
        Display the list of users.
        '''
        service_client = aws_service.AwsService('iam')
        userlist = service_client.service.list_users()
        service_client.service.populate_groups_in_users(userlist)

        if outputformat == "json":
            pprinter = pprint.PrettyPrinter()
            pprinter.pprint(userlist)
        else:
            self.display_iam_userlist_table(userlist)
项目:orca    作者:bdastur    | 项目源码 | 文件源码
def display_iam_user_policies(self,
                                  user_name,
                                  outputformat='json'):
        '''
        Display policies attached to the user.
        '''

        awsconfig = aws_config.AwsConfig()
        profiles = awsconfig.get_profiles()

        service_client = aws_service.AwsService('iam')

        policyinfo = {}
        for profile in profiles:
            policyinfo[profile] = []
            policies = service_client.service.get_user_attached_policies(
                UserName=user_name,
                profile_name=profile)
            policyinfo[profile] = policies

        if outputformat == "json":
            pprinter = pprint.PrettyPrinter()
            pprinter.pprint(policyinfo)

        if outputformat == "table":
            self.display_iam_user_policies_table(user_name,
                                                 policyinfo)
项目:orca    作者:bdastur    | 项目源码 | 文件源码
def perform_profile_operations(self, namespace):
        '''
        Handle the profile operations
        '''
        awsconfig = aws_config.AwsConfig()
        profiles = awsconfig.get_profiles()

        profile_summary = {}
        for profile in profiles:
            profile_summary[profile] = {}
            profile_summary[profile]['access_key_id'] = \
                awsconfig.get_aws_access_key_id(profile)
            profile_summary[profile]['secret_access_key'] = \
                awsconfig.get_aws_secret_access_key(profile)

        if namespace.output == "json":
            pprinter = pprint.PrettyPrinter()
            pprinter.pprint(profile_summary)
        else:
            # Setup table.
            header = ["Profile Name", "Access Key ID", "Secret Access Key"]
            table = prettytable.PrettyTable(header)

            for profile in profile_summary.keys():
                row = [profile,
                       profile_summary[profile]['access_key_id'],
                       profile_summary[profile]['secret_access_key']]
                table.add_row(row)

            print table
项目:cbapi-examples    作者:cbcommunity    | 项目源码 | 文件源码
def printWatchlistHits(serverurl, watchlistid, watchlisttype, rows):
    global cb
    pp = pprint.PrettyPrinter(indent=2)

    print rows

    getparams = {"cb.urlver": 1,
                "watchlist_%d" % watchlistid : "*",
                "rows": rows }

    if watchlisttype == 'modules':
        getparams["cb.q.server_added_timestamp"] = "-1440m"
        r = cb.cbapi_get("%s/api/v1/binary?%s" % (serverurl, urllib.urlencode(getparams)))
        parsedjson = json.loads(r.text)
        pp.pprint(parsedjson)

    elif watchlisttype == 'events':
        getparams["cb.q.start"] = "-1440m"
        r = cb.cbapi_get("%s/api/v1/process?%s" % (serverurl, urllib.urlencode(getparams)))
        parsedjson = json.loads(r.text)
        pp.pprint(parsedjson)
    else:
        return

    print
    print "Total Number of results returned: %d" % len(parsedjson['results'])
    print
项目:cbapi-python    作者:carbonblack    | 项目源码 | 文件源码
def printWatchlistHits(serverurl, watchlistid, watchlisttype, rows):
    global cb
    pp = pprint.PrettyPrinter(indent=2)

    print rows

    getparams = {"cb.urlver": 1,
                "watchlist_%d" % watchlistid : "*",
                "rows": rows }

    if watchlisttype == 'modules':
        getparams["cb.q.server_added_timestamp"] = "-1440m"
        r = cb.cbapi_get("%s/api/v1/binary?%s" % (serverurl, urllib.urlencode(getparams)))
        parsedjson = json.loads(r.text)
        pp.pprint(parsedjson)

    elif watchlisttype == 'events':
        getparams["cb.q.start"] = "-1440m"
        r = cb.cbapi_get("%s/api/v1/process?%s" % (serverurl, urllib.urlencode(getparams)))
        parsedjson = json.loads(r.text)
        pp.pprint(parsedjson)
    else:
        return

    print
    print "Total Number of results returned: %d" % len(parsedjson['results'])
    print
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def check_root_privileges():
    """
    This function checks if the current user is root.
    If the user is not root it exits immediately.
    """
    if os.getuid() != 0:
        # check if root user
        PrettyPrinter.println(PrettyPrinter.red("Root privileges are required to run this tool"))
        sys.exit(1)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def _format(color, text):
        """
        Generic pretty print string formatter
        """
        return u"{}{}{}".format(color, text, PrettyPrinter.Colors.ENDC)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def header(text):
        """
        Formats text as header
        """
        return PrettyPrinter._format(PrettyPrinter.Colors.HEADER, text)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def bold(text):
        """
        Formats text as bold
        """
        return PrettyPrinter._format(PrettyPrinter.Colors.BOLD, text)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def blue(text):
        """
        Formats text as blue
        """
        return PrettyPrinter._format(PrettyPrinter.Colors.BLUE, text)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def light_purple(text):
        """
        Formats text as light_purple
        """
        return PrettyPrinter._format(PrettyPrinter.Colors.LIGTH_PURPLE, text)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def green(text):
        """
        Formats text as green
        """
        return PrettyPrinter._format(PrettyPrinter.Colors.GREEN, text)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def dark_green(text):
        """
        Formats text as dark_green
        """
        return PrettyPrinter._format(PrettyPrinter.Colors.DARK_GREEN, text)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def yellow(text):
        """
        Formats text as yellow
        """
        return PrettyPrinter._format(PrettyPrinter.Colors.YELLOW, text)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def dark_yellow(text):
        """
        Formats text as dark_yellow
        """
        return PrettyPrinter._format(PrettyPrinter.Colors.DARK_YELLOW, text)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def orange(text):
        """
        Formats text as orange
        """
        return PrettyPrinter._format(PrettyPrinter.Colors.ORANGE, text)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def cyan(text):
        """
        Formats text as cyan
        """
        return PrettyPrinter._format(PrettyPrinter.Colors.CYAN, text)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def magenta(text):
        """
        Formats text as magenta
        """
        return PrettyPrinter._format(PrettyPrinter.Colors.MAGENTA, text)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def purple(text):
        """
        Formats text as purple
        """
        return PrettyPrinter._format(PrettyPrinter.Colors.PURPLE, text)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def info(text):
        """
        Formats text as info
        """
        return PrettyPrinter._format(PrettyPrinter.Colors.LIGHT_YELLOW, text)
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def p_bold(text):
        """
        Prints text formatted as bold
        """
        sys.stdout.write(PrettyPrinter.bold(text))
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def pl_bold(text):
        """
        Prints text formatted as bold with newline in the end
        """
        sys.stdout.write(u"{}\n".format(PrettyPrinter.bold(text)))
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def p_blue(text):
        """
        Prints text formatted as blue
        """
        print(PrettyPrinter.blue(text))
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def p_green(text):
        """
        Prints text formatted as green
        """
        print(PrettyPrinter.green(text))
项目:DeepSea    作者:SUSE    | 项目源码 | 文件源码
def p_red(text):
        """
        Prints text formatted as red
        """
        print(PrettyPrinter.red(text))
项目:FenicsSolver    作者:qingfengxia    | 项目源码 | 文件源码
def print(self):
        import pprint
        pp = pprint.PrettyPrinter(indent=4)
        pp.pprint(self.settings)
项目:AI-Pacman    作者:AUTBS    | 项目源码 | 文件源码
def printTest(testDict, solutionDict):
    pp = pprint.PrettyPrinter(indent=4)
    print "Test case:"
    for line in testDict["__raw_lines__"]:
        print "   |", line
    print "Solution:"
    for line in solutionDict["__raw_lines__"]:
        print "   |", line
项目:calm    作者:cygwin    | 项目源码 | 文件源码
def pprint_patch():
    if isinstance(getattr(pprint.PrettyPrinter, '_dispatch', None), dict):
        orig = pprint.PrettyPrinter._dispatch[collections.OrderedDict.__repr__]
        pprint.PrettyPrinter._dispatch[collections.OrderedDict.__repr__] = patched_pprint_ordered_dict
        try:
            yield
        finally:
            pprint.PrettyPrinter._dispatch[collections.OrderedDict.__repr__] = orig
    else:
        yield

#
#
#
项目:hostapd-mana    作者:adde88    | 项目源码 | 文件源码
def process(self, write, request, submit, **kw):
        """Override me: I process a form.

        I will only be called when the correct form input data to process this
        form has been received.

        I take a variable number of arguments, beginning with 'write',
        'request', and 'submit'.  'write' is a callable object that will append
        a string to the response, 'request' is a twisted.web.request.Request
        instance, and 'submit' is the name of the submit action taken.

        The remainder of my arguments must be correctly named.  They will each be named after one of the

        """
        write("<pre>Submit: %s <br /> %s</pre>" % (submit, html.PRE(pprint.PrettyPrinter().pformat(kw))))