[PyAR2] Loop? Sockets?
srilyk at gmail.com
Fri Feb 15 20:28:42 CET 2008
I have a question about efficiency I suppose it is.
I'm experimenting with a chat type program, and here's question:
Would it be considered efficient to run an infinite loop continually opening
and reading a file, say
f = open('convo.txt', 'r')
f = f.readlines()
Or some variant of that? Or are there sockets(?) or something that would
work better? Basically I just want to be able to open it whenever the file
is changed, so that seems like overkill (and probably a waste of cycles).
To be considered stupid and to be told so is more painful than being called
gluttonous, mendacious, violent, lascivious, lazy, cowardly: every weakness,
every vice, has found its defenders, its rhetoric, its ennoblement and
exaltation, but stupidity hasn't. - Primo Levi
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyAR2