معرفی شرکت ها


easyexception-0.0.3


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Easy-to-use custom error/warning/message exceptions.
ویژگی مقدار
سیستم عامل -
نام فایل easyexception-0.0.3
نام easyexception
نسخه کتابخانه 0.0.3
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Ao Liu, Jie Gao
ایمیل نویسنده ao@aoliu.tech, geographer2008@gmail.com
آدرس صفحه اصلی https://pypi.python.org/pypi/easyexception
آدرس اینترنتی https://pypi.org/project/easyexception/
مجوز MIT
# easyexception Conveniently submit and print an error, warning, or message from your codes, and specify where the error, warning, or message came from. ### Purpose When one raise an exception in his/her program, or throws a warning, on the screen it is often unclear where the error/warning/message was initiated. This makes it hard for users of the program to troubleshoot the problem. In **easyexception**, this is solved by a simple trick, we combine all kinds of screen messages into one function: \ `easyexception(origin, code, severity, msg)`\ where *severity* can be "Error", "Warning", or "Message" ### Usage To use the `easyexception` function, import it in Python: from easyexception.exception import easyexception The program developer just calls the function to define the above information and deliver the message to the user screen. e.g. if you are developing a calculator program and the user puts in a negative number and then presses "Square Root". You want to throw a warning but not to stop the program, you may do: easyexception("mymath.py", "calculate_sqrt(n)", "Warning", "Can not give the square root for a negative number") The above assumes `easyexception` is called in function `calculate_sqrt(n)` in file mymath.py. Or, if the user magically puts some texts in the input bar, and you hate it so much that you would like to raise an Error and stop the program. You may then do: easyexception("get_user_input.py", "eval_expr(eq)", "Error", "Texts are not allowed in the input bar!") Similarly, the above assumes `easyexception` is called in function `eval_expr(eq)` in file get_user_input.py. Finally, `severity="Message"` can be used if you want to notify the user that a calculation is complete, or the user has cleared the memory, etc. ### Installation Install easyexception using `pip`, or `pip3` pip install easyexception ### Repository [GitHub page](https://github.com/frankliuao/easyexception)


زبان مورد نیاز

مقدار نام
>=3.0 Python


نحوه نصب


نصب پکیج whl easyexception-0.0.3:

    pip install easyexception-0.0.3.whl


نصب پکیج tar.gz easyexception-0.0.3:

    pip install easyexception-0.0.3.tar.gz