On 27/01/07, Julian Romero <[EMAIL PROTECTED]> wrote:
> On 1/27/07, Don Arbow <[EMAIL PROTECTED]> wrote:
>
> >
> > Using print statements to debug a program is like figuring out what
> > is wrong with your car by listening for weird noises. Using a
> > debugger is like opening the hood and tweaking the engine with tools.
> >
> >
> Opening the hood seems a good approach...but you need to stop the car. The 
> same goes for pdb vs. print statements.
> (I talk about production server)
> regards,
> --
> Julián
>

Well personally I wouldn't ever repair a moving car. Honestly, to me
at least, it seems your continuation of this analogy has proved why
what you're doing is a bad idea.

Why not keep the project in source control? Keep a global_settings.py
and import it into your settings.py. Next, keep separate settings.pys
for development and production and as soon as you've fixed a bug or
want to release a new version of the site just do a commit at the
development end and an update at the production end and restart
apache/your fastcgi thingy. If there are inconsistencies between the
environments then that's a configuration problem. If it's a big site
you could create a tag for each version and create and checkout a new
tag for each version of the site.

As for the original topic, I used to use print, but then you have to
keep going back and changing what you want. So I just use pdb as in a
lot of ways it acts like a superset of print.
-- 
http://grimboy.co.uk

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to