whatthewhat

whatthewhat is a tool for launching a Google search for exceptions from Python apps.

Source Codehttps://github.com/dhellmann/whatthewhat
PyPIhttps://pypi.org/project/whatthewhat/

whatthewhat was inspired by some comments Lynn Root made about teaching new developers that it is OK to search for error messages as part of learning about Python and programming in general.

tweets

Example

Use wtw to run your python script, and if the script throws an exception whatthewhat will open a Google search for the error message in your browser.

$ wtw ./tester.py
Searching for: TypeError unhashable type: 'list'
Traceback (most recent call last):
  File Users/dhellmann/Envs/whatthewhat/bin/wtw line 10, in <module>
    sys.exit(main())
  File Users/dhellmann/Devel/whatthewhat/whatthewhat/main.py line 65, in main
    sys.argv,
  File Users/dhellmann/Devel/whatthewhat/whatthewhat/execfile.py line 120, in run_python_file
    exec_code_object(code, main_mod.__dict__)
  File exec_function> line 2, in exec_code_object
  File /tester.py line 7, in <module>
    f()
  File /tester.py line 5, in f
    return {['a', 'b']: ['c', 'd']}
TypeError: unhashable type: 'list'

2014