empty lists vs empty generators

2005-05-02 Thread Brian Roberts
I'm using using generators and iterators more and more intead of passing lists around, and prefer them. However, I'm not clear on the best way to detect an empty generator (one that will return no items) when some sort of special case handling is required. Typical code for handling an empty

Re: looking for way to include many times some .py code from anotherpython code

2005-03-08 Thread Brian Roberts
Am I so deperately fighting the language? No-one here on the list needs to set hundreds variables at once somewhere in their code? I still don't get why: I once (and only once) needed hundreds of variables in a program. It was to simplify creation of unit tests, not for production use.

web status display for long running program

2005-02-24 Thread Brian Roberts
I have a command line Python program that sometimes takes a bit (several minutes) to run. I want to provide an optional method for an impatient user (me!) to check the status of the program. The type and amount of status information doesn't fit nicely into a --verbose or logger -- either too