:const:`curses.KEY_HOME`, or :const:`curses.KEY_LEFT`. Usually the main loop of
your program will look something like this::
- while 1:
+ while True:
c = stdscr.getch()
if c == ord('p'): PrintDocument()
elif c == ord('q'): break # Exit the while()
if fileitem.file:
# It's an uploaded file; count lines
linecount = 0
- while 1:
+ while True:
line = fileitem.file.readline()
if not line: break
linecount = linecount + 1
followed by the LogRecord in pickle format. Logs the record
according to whatever policy is configured locally.
"""
- while 1:
+ while True:
chunk = self.connection.recv(4)
if len(chunk) < 4:
break
# Add the From: and To: headers at the start!
msg = ("From: %s\r\nTo: %s\r\n\r\n"
% (fromaddr, ", ".join(toaddrs)))
- while 1:
+ while True:
try:
line = raw_input()
except EOFError:
s.listen(1)
conn, addr = s.accept()
print('Connected by', addr)
- while 1:
+ while True:
data = conn.recv(1024)
if not data: break
conn.send(data)
sys.exit(1)
conn, addr = s.accept()
print('Connected by', addr)
- while 1:
+ while True:
data = conn.recv(1024)
if not data: break
conn.send(data)