403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/saltstack/salt/lib/python3.10/site-packages/salt/output/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/saltstack/salt/lib/python3.10/site-packages/salt/output/pprint_out.py
"""
Python pretty-print (pprint)
============================

The python pretty-print system was once the default outputter. It simply
passes the return data through to ``pprint.pformat`` and prints the results.

CLI Example:

.. code-block:: bash

    salt '*' foo.bar --out=pprint

Example output:

.. code-block:: python

    {'saltmine': {'foo': {'bar': 'baz',
                          'dictionary': {'abc': 123, 'def': 456},
                          'list': ['Hello', 'World']}}}
"""

import pprint

# Define the module's virtual name
__virtualname__ = "pprint"


def __virtual__():
    """
    Change the name to pprint
    """
    return __virtualname__


def output(data, **kwargs):  # pylint: disable=unused-argument
    """
    Print out via pretty print
    """
    if isinstance(data, Exception):
        data = str(data)
    if "output_indent" in __opts__ and __opts__["output_indent"] >= 0:
        return pprint.pformat(data, indent=__opts__["output_indent"])
    return pprint.pformat(data)

Youez - 2016 - github.com/yon3zu
LinuXploit