Join this project:

To join this project, please contact the project administrator of this project, as shown on the project summary page, throught the project Developers Forum.

Get the source code:

Source code for this project may be available as downloads or through the CVS or Subversion SCM repository used by the project, as accessible from the project summary page.

What you're waiting for? hosts over 100,000 Open Source projects. You may find what you're looking for by searching our site or using our Software Map.

New Project are in the way

Replacement for ClassBrowser

A small application to replace the Python ClassBrowser and PathBrowser. The project is waiting for you.

The Gravity Project

This project is a 3D engine to simulate large gravitational system. Based on Direct Python, it will be able to simulate a few million interactions per seconds. The interface should be made with a teaching objective, and must be user oriented. This project need a mathematician for some validation.


For more information about those future project, please contact me throught the Developers forums.

Objective of pybettererror:

Repetitiveness create the need of automation.

I was always opening module and scrolling to the exceptions causing statement. Loosing precious time trying to find the write line of code where it all starts. Thats where i thought an Hyperlink on the traceback would save lots of time, and increase productivity.

The means to do what we need

Python is made to be updated and customize. You can read almost every line of code of it. You can improve on it, even if it's not easy to find something to complain about. But, once in a while, a good idea make it's way up the lather. This is one of them


Create Hyperlinks to the file line number with the traceback data sent by the debugger to the output window.


Replacing sys.stderr.write by a custom method.

How does it work?

Transformation made by pybettererror in the sys module

Actualy, the transformation is made deep in the core of the existing shell active instance. When a program is executed, all information printed or inputed pass by the shell window, unless redirected by the programme or the user. This is exactly what this module is doing.

How to intercept the debugger traceback messages?

There is, in the sys module, an instance named sys.stderr, it is made to receve all message from the python debuger. It send those message to the output window with the proper coloring tags. The debuger send is message to the command sys.stderr.write and the standard error (sys.stderr) send it to the output text widget with the error tags.

Screen shot

To intercept those message, there is just to replace the sys.stderr.write method by a custom method. We still need to print the message sent by the debuger, so we can see what is going on. But we can reformat and parce the informations in the same time.

Now the messages

Normally, those message are returned to the output window with you own tags. (idlelib.PyShell.flist.pyshell.write) But you can also print those lines into any object, container or widget.

This is where i got the idea to create hyperlinks with those traceback file and line numbers sent by the debugger. It was an genious idea! I needed to share it with everyone.

Designed by M. Goudreau. 2010