Werkzeug DjangoExtensions Interactive Python in the Network Browser

15 views
Skip to first unread message

Glyn Price

unread,
Dec 4, 2014, 2:16:54 PM12/4/14
to econsens...@googlegroups.com
Werkzeug DjangoExtensions Interactive Python in the Network Browser

I've tried using werkzeug that is a partial debugger: used pip to install django_extensions & werkzeug; enter a 'assert False xyz'
in the code; python manage.py runserver_plus and then invoke the relevant URL. This gives me a Assertion Error page in Internet
Browser and on clicking the terminal-icon on the right of the last line of the trace-back, I get the >>> prompt for what looks to me
like interactive python. (This is great for me.)

Then I can keyin things at the >>>. If I only need just one print statement then this is not useful, but if I want to use many print
statement then it is useful (putting one 'assert False xyz' line rather than lots of print statement that require deleting afterwards).


Thanks Glyn

Jo Paulger

unread,
Dec 5, 2014, 3:44:23 AM12/5/14
to econsens...@googlegroups.com

Never heard of that, so thanks Glyn.

How does it compare with pdb for debugging? You don't have to install anything for that, just insert "import pdb; pdb.set_trace()" as your breakpoint, then you get something like the python inyeractive prompt right there in your runserver output. pdb lets you do stuff lke stepping through lines of code, and printing the stacktrace. Easy to grep for "pdb" too :)

Jo
(one-time volunteer)

--
You received this message because you are subscribed to the Google Groups "econsensusdiscuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to econsensusdisc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages