Need somebody schmardter than me

Gene Heskett gheskett at wdtv.com
Sun Aug 18 16:48:17 EDT 2013


On Sunday 18 August 2013 16:38:52 Roy Smith did opine:

> In article <mailman.2.1376856608.19984.python-list at python.org>,
>  Gene Heskett <gheskett at wdtv.com> wrote:
> 
> [much that doesn't appear to have anything to do with Python elided]
> 
> > When cheese runs this camera, there is a several second delay while
> > cheese is apparently talking to it to establish the correct output
> > format before cheese starts displaying its output, so I am wondering
> > if an initialization time delay might be the fix,
> 
> In general, when you have some sort of synchronization problem, i.e.,
> "this piece of code must not start running until that other thing is
> completed", sticking in a time delay is:
> 
> 1) Almost always the wrong thing to do.
> 
> 2) Very often the most simple solution.
> 
> How it can simultaneously be both of these is left as an exercise for
> the reader :-)
> 
Oh Loverly...

> > but I haven't a clue about how to go about that in python
> 
> import time

That of course goes near the top of the script.

> time.sleep(1.5)

I'll see if I can see a sensible place to add this one.
> will sleep for 1.5 seconds.

Thanks.  Its likely I'll be back because now that I think about it, that 
first line I quoted is quite likely from the function itself, and doesn't 
serve to establish the context of the call, hence the actual arguments to 
it.

Its one of those cases where, if the function were to also echo the 
arguments it was handed, the troubleshooting would be a lot more 
straightforward because you could then see the error causer right up front.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene> is up!
My views 
<http://www.armchairpatriot.com/What%20Has%20America%20Become.shtml>
Automobile, n.:
	A four-wheeled vehicle that runs up hills and down pedestrians.
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
         law-abiding citizens.



More information about the Python-list mailing list