I was having a problem with pudb showing me blank screens in some
standard library code.  The problem occurred when I needed to override
the __builtins_.open function.  I needed to control the open command
for some unit tests.

So I would be stepping through my code then I would come to a standard
library call that normally always worked in pudb.  Only now it stepped
into the library and there was no code shown.  I found out that the
issue was caused by the settings.py pudb library calling open and
using my overridden function.

The solution I came up with was to create a copy of the original open
function at the top of settings.py and reset open to the original in a
function and then revert back to the previous overridden setup before
return from the function.

Remember to backup the original settings.py before you patch.

To patch copy the patch somewhere and then cd into the directory
containing the pudb settings.py file.  Now run.

patch -p1 -i /full/path/to/patch settings.py

Here is the patch.

http://pastebin.com/3rBqS4iP

It is against settings.py
commit 6013ec2a04b521c30f728ea3e47514066e646f38
Date:   Fri Mar 18 10:43:54 2011 -0400

DISCLAIMER:
This code mod was made with little knowledge or workings with pudb.  I
have been using it for 2 days now.  USE AT YOUR OWN RISK.  I'm sure
there is a better way to do it however this works and I need to get
back to work.  ;)

- Shawn

_______________________________________________
Pudb mailing list
[email protected]
http://lists.tiker.net/listinfo/pudb

Reply via email to