Advice on long running processes

2007-10-11 Thread commander_coder
Hello, I write a lot of CGI scripts, in Python of course. Now I need to convert some to long-running processes. I'm having trouble finding resources about the best practices to do that. I've found a lot of email discussions that say something like, "You need to educate yourself about the differ

Re: Advice on long running processes

2007-10-11 Thread commander_coder
Thank you to folks for the replies. Jim -- http://mail.python.org/mailman/listinfo/python-list

tools to install not in python tree?

2008-03-03 Thread commander_coder
Hello, I have some materials for a project that I am working on that I keep in a source code control system (svn now, but I'm experimenting with mercurial). I want to install these things from the repository, but not into site-packages/ as Distutils wants to do. For instance there are some admin

Re: tools to install not in python tree?

2008-03-04 Thread commander_coder
Thank you for the helpful replies. I shall check out the links. (I looked at some setup.py's but mxBase was not among them.) Regards, Jim -- http://mail.python.org/mailman/listinfo/python-list

unit testing a routine that sends mail

2010-02-18 Thread commander_coder
Hello, I have a routine that sends an email (this is how a Django view notifies me that an event has happened). I want to unit test that routine. So I gave each mail a unique subject line and I want to use python's mailbox package to look for that subject. But sometimes the mail gets delivered

Re: unit testing a routine that sends mail

2010-02-18 Thread commander_coder
On Feb 18, 9:55 am, Roy Smith wrote: > Just a wild guess here, but maybe there's some DNS server which > round-robins three address records for some hostname you're using, one of > which is bogus. > > I've seen that before, and this smells like the right symptoms. Everything happens on my laptop,

Re: unit testing a routine that sends mail

2010-02-18 Thread commander_coder
On Feb 18, 10:27 am, Bruno Desthuilliers wrote: > you could just mock the send_mail > function to test that your app does send the appropriate mail - which is > what you really want to know. That's essentially what I think I am doing. I need to send a relatively complex email, multipart, with b

Re: unit testing a routine that sends mail

2010-02-18 Thread commander_coder
Bruno, I talked to someone who explained to me how what you said gives a way around my difficulty. Please ignore the other reply. I'll do what you said. Thank you; I appreciate your help. Jim -- http://mail.python.org/mailman/listinfo/python-list