Using serial with arduino and python, cannot read propper data from adruino

Thanks for the reply, ill look into my python code more closely then. Appreciate the effort on the simple python program.

I still could not get the code i wrote to work but found out what was going on, kind of.

It does not work the first time. I have to put the python code in a while loop like the example from cattledog. Once i run it twice in one program run, it works just fine.

Anyone have any idea how to stop this? it happens with the sample code as well. The first loop, nothing, second loop and on is good.

Sometimes it does not work the second time through as well. But have not seen it fail 3 times in a row. After it starts working it seems to be fine.