semvec/pypi-packages huggingface dataset:
printargs 1.0.1
Show and print the content of argparse.Namespace (args) objects for debugging.
License: MIT

README
======

Printargs - A debugging helper for argparse
-------------------------------------------

Print a nicely formatted view of an `argparse.Namespace` object
for debugging purposes:

::

    import sys
    import argparse    
    import printargs

    def main(args):
        printargs.show(args)
        # do somthing with args

    def get_argument_parser():
        p = argparse.ArgumentParser()
        p.add_argument('-f', '--foo', action='store')
        p.add_argument('-b', '--bar', action='store', type=int)
        p.add_argument('-o', '--output', action='store', default=sys.stdout)
        return p

    if __name__ == "__main__":
        argument_parser = get_argument_parser()
        args = argument_parser.parse_args()
        main(args)

To use the output for logging or to edit it use the `printargs.formatted`
function, which returns the string instead of printing it:

::

    import sys
    import argparse    
    import printargs

    def main(args):
        t = printargs.formatted(args)
        with open('log', 'a') as logfile:
            logfile.write("Test program called with parameters:")
            logfile.write(t)
            logfile.write("\n\n")
        

    def get_argument_parser():
        p = argparse.ArgumentParser()
        p.add_argument('-f', '--foo', action='store')
        p.add_argument('-b', '--bar', action='store', type=int)
        p.add_argument('-o', '--output', action='store', default=sys.stdout)
        return p

    if __name__ == "__main__":
        argument_parser = get_argument_parser()
        args = argument_parser.parse_args()
        main(args)

Installation
~~~~~~~~~~~~

Printargs can be installed with pip:

::

   me@machine:~$ pip install printargs

or from the sources:

::

   me@machine:~$ git clone https://HenningTimm@bitbucket.org/HenningTimm/printargs.git
   me@machine:~$ cd printargs
   me@machine:~/printargs$ python setup.py install


Planned features
~~~~~~~~~~~~~~~~

- curses based output with colors


License
~~~~~~~

Printargs is Open Source and licensed under the `MIT
License <http://opensource.org/licenses/MIT>`__.
pygments-xslfo-formatter 1.1.2
A pygments formatter that outputs <fo:inline> tags
License: MIT
Keywords: syntax highlighting xsl-fo

Pygments formatter for xsl-fo output
====================================

This is a formatter for `pygments <http://pygments.org>`__ that produces
output marked up with tags with the appropriate colour and other
presentational attributes set according to the pygments style in use.

To be useful this must be embeded in a complete xsl-fo document. It was
developed for use with `asciidoc <http://asciidoc.org>`__ to produce
PDF's using `fop <http://xmlgraphics.apache.org/fop>`__ with minimal
configuration or extra dependencies.

It is possible that it could be used in more general docbook to pdf tool
chains.

Installation
------------

Install from pypi:

.. code:: console

    $ pip install pygments-xslfo-formatter

To install from the from the source distibution. Use any of the normal
installation methods from the top directory of the distribution to install.

.. code:: console

    $ python setup.py install   # Usual setup.py installation method

    $ pip install .             # Using pip

This will install pygments if it is not already installed. You can check
that it is working by listing the formatters and checking for the
presence of one containing *xslfo*.

.. code:: console

    $ pygmentize -L formatters
    Formatters:
    ~~~~~~~~~~~
    [... ommitted output ...]
    * xslfo, xsl-fo:
        Format tokens as XSL-FO ``<fo:inline>`` tags.

Usage
-----

As this just adds a new formatter type to pygments, you just use' xslfo'
where ever you might, for example, specify 'html' as a formatter name.

.. code:: console

    $ pygmentize -f xslso -l python setup.py

You should see lots of tags

To use with asciidoc, which is the initial purpose of this extension
look at the example directory which contains a simple but complete
example.

Example result
--------------

You can see an example pdf file
here:\ `[1] <https://bitbucket.org/sratcliffe/pygments-xslfo-formatter/downloads/example.pdf>`__