Skip to content

A simple python library for running code and ignore any errors

License

Notifications You must be signed in to change notification settings

WYishai/suppyress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3ff2028 · Aug 8, 2018

History

1 Commit
Aug 8, 2018
Aug 8, 2018
Aug 8, 2018
Aug 8, 2018
Aug 8, 2018
Aug 8, 2018
Aug 8, 2018

Repository files navigation

suppyress

A simple python library for running code and ignore any errors.

Getting Started

Installing

You can install this package with pip.

pip install suppyress

Usage

All examples are intended for writing in a python shell (or python code file).

from suppyress import suppress

@suppress
def test(a, b=1):
    result = "%s -> %s" % (a, int(b))
    return result


assert test("a", b="2") is not None
assert test("a", b="a") is None

or:

from suppyress import safe_run

assert safe_run(int, "2") is not None
assert safe_run(int, "a") is None

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details

About

A simple python library for running code and ignore any errors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages