The wiki:RepyV2Tutorial includes a few sample programs which are not exactly good examples for prospective programmers.
Our faux web server in examples 1.2, 1.3, 1.4 must serve an HTTP header, not the content alone. I've fixed the code of 1.2 a while ago, but overlooked the other instances.
Wherever we except SocketWouldBlockError as e:, don't continue, but sleep(0.1). Busy waiting is very expensive on some devices (especially Android), and has weird consequences there.
Also, drop the as e.
The list of time servers used in 4.2 is outdated, see r7137 and r7172.
The todos are:
Change code shown on the wiki page, and
Update and upload the new files too.
It's important to fix these issues ASAP. People out there are relying on our documentation to get their projects up to speed. Let's help them where we can!
Thanks go out to Angelo Vezzoli, Alessandra Flammini, and Guoliang Duan for pointing out an issue with sleep() on Android that led to the discovery of item 2 above. Abey Joy and Florian Metzger deserve a mention for their discovery of the HTTP header issue.
The wiki:RepyV2Tutorial includes a few sample programs which are not exactly good examples for prospective programmers.
except SocketWouldBlockError as e:
, don'tcontinue
, butsleep(0.1)
. Busy waiting is very expensive on some devices (especially Android), and has weird consequences there.as e
.The todos are:
It's important to fix these issues ASAP. People out there are relying on our documentation to get their projects up to speed. Let's help them where we can!
Thanks go out to Angelo Vezzoli, Alessandra Flammini, and Guoliang Duan for pointing out an issue with
sleep()
on Android that led to the discovery of item 2 above. Abey Joy and Florian Metzger deserve a mention for their discovery of the HTTP header issue.