<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

f = open('foo', 'rU')<br>
while True:<br>
    ...<br>
    # if f.readline() == '': # bad style<br>
    # if not len(f.readline()): # bad style<br>
    # if len(f.readline()) == 0: # bad style<br>
    if not f.readline():<br>
        break<br></blockquote><div><br></div><div style>Not entirely sure of the context, but "best" for Python 2.4 and below might be:</div><div style><br></div><div style>f = open('foo', 'rU')</div>

<div style>for line in f:</div><div style>    # Do whatever with line or pass</div><div style>f.close()</div><div style><br></div><div style>And if you are using Python 2.5 or higher, this is "best", as it closes the file always, even on an exception:</div>

<div style><br></div><div style>with open('foo', 'rU') as f:</div><div style>    for line in f:</div><div style>        # Do whatever with line or pass</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

better keyboards<br>
Model M13 Trackpoint II<br>
<a href="https://en.wikipedia.org/wiki/Model_M_keyboard" target="_blank">https://en.wikipedia.org/wiki/Model_M_keyboard</a><br>
<a href="https://en.wikipedia.org/wiki/Unicomp" target="_blank">https://en.wikipedia.org/wiki/Unicomp</a><br>
<a href="http://pckeyboard.com/page/category/EnduraPro" target="_blank">http://pckeyboard.com/page/category/EnduraPro</a><br>
<a href="https://en.wikipedia.org/wiki/ZF_Electronics#Cherry_switches" target="_blank">https://en.wikipedia.org/wiki/ZF_Electronics#Cherry_switches</a><br>
<a href="https://en.wikipedia.org/wiki/Pointing_stick" target="_blank">https://en.wikipedia.org/wiki/Pointing_stick</a><br>
<a href="https://en.wikipedia.org/wiki/Happy_Hacking_Keyboard" target="_blank">https://en.wikipedia.org/wiki/Happy_Hacking_Keyboard</a><br>
<br>
has bad feel:<br>
<a href="https://en.wikipedia.org/wiki/Optimus_Maximus_keyboard" target="_blank">https://en.wikipedia.org/wiki/Optimus_Maximus_keyboard</a><br>
<br>
<a href="https://en.wikipedia.org/wiki/Sassafras" target="_blank">https://en.wikipedia.org/wiki/Sassafras</a></blockquote><div><br></div><div><br></div><div style>I am *very* pleased with my Leopold with Cherry MX Brown switches: <a href="http://elitekeyboards.com/products.php?sub=leopold,tenkeyless&pid=fc200rtab">http://elitekeyboards.com/products.php?sub=leopold,tenkeyless&pid=fc200rtab</a></div>

<div style><br></div><div style>I got the one without the numpad (called a "tenkeyless" keyboard), which keeps my mouse (Logitech Trackball) closer and my wrist bent less. The combination of the keyboard (more tactile feedback, less typing pressure), the closer mouse, and the trackball has nearly eliminated the carpal tunnel symptoms I was having. The only negative at all on the keyboard is the letters are painted on rather than etched, so they are fading a little bit after a year of use (I'm a heavy user).</div>

<div style><br></div><div style>Cheers,</div><div style>Eric</div><div style><br></div></div></div></div>