Skip to content

Raises' in the source code, all's right with the Stack Overflow

Notifications You must be signed in to change notification settings

mlouielu/raises-stackoverflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Raises Stack Overflow

Raises' in your source code, all's right with the Stack Overflow

asciicast

Install

Please use pip to install raises

$ pip install raises

How to use?

Is easy to use raises in your daily work, to help you find out raises error's answer on Stack Overflow, simply import raises to your code, then done!

import raises  # To the top of your source code

Example

For example, if we type in int("") to REPL, it will raise a ValueError:

>>> import raises
>>> int("")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: ''

You should now saw a new tab in your browser, to find out the answer on Stack Overflow!

API

  • raises.enable()

To enable the raises function

  • raises.disable()

To disable the raises function

  • raises.raiser

The core function of raises, it was the sys.excepthook replacer to handle every exceptio, and to open a new browser with tabs.

Where is setup.py? You magically upload to PyPI without setup.py?

It is 2017, please use flit

About

Raises' in the source code, all's right with the Stack Overflow

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages