semvec/pypi-packages huggingface dataset:
elevate 0.1.3
Python library for requesting root privileges
License: MIT

Elevate: Request root privileges
================================

Elevate is a small Python library that re-launches the current process with
root/admin privileges using one of the following mechanisms:

- UAC (Windows)
- AppleScript (macOS)
- ``pkexec``, ``gksudo`` or ``kdesudo`` (Linux)
- ``sudo`` (Linux, macOS)

Usage
-----

To use, call ``elevate.elevate()`` early in your script. When run as root this
function does nothing. When not run as root, this function replaces the current
process (Linux, macOS) or creates a new process, waits, and exits (Windows).
Consider the following example:

.. code-block:: python

    import os
    from elevate import elevate

    def is_root():
        return os.getuid() == 0

    print("before ", is_root())
    elevate()
    print("after ", is_root())

This prints::

    before False
    before True
    after True

On Windows, the new process's standard streams are not attached to the parent,
which is an inherent limitation of UAC. By default the new process runs in a
new console window. To suppress this window, use
``elevate(show_console=False)``.

On Linux and macOS, graphical prompts are tried before ``sudo`` by default. To
prevent graphical prompts, use ``elevate(graphical=False)``.
sentry-stack-checker 0.4
Pylint plugin for checking usage of log.exception
License: MIT

Sentry stack checker
====================

Pylint plugin for finding logging calls inside exception handlers, and suggest they include ``exc_info=True``, or change ``extra={'stack': True}`` to ``exc_info=True`` to get the stack from the exception instead of the one from the log statement.

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

::

    $ pip install sentry_stack_checker

Usage
-----

::

    $ pylint --load-plugins sentry_stack_checker <module> -E -d all -e R9501
    $ pylint --load-plugins sentry_stack_checker <module> -E -d all -e R9502

The option ``report-loggers`` can be provided to restrict the logging methods that are checked:

::

    $ pylint --load-plugins sentry_stack_checker <module> --report-loggers=warning,error