"J. Peng" <[EMAIL PROTECTED]> writes: > print line,
Do you really want all the lines crunched together like that? If not, leave off the comma. > I dont like that flag of "done",then I tried to re-write it as: > > fd = open("/etc/sysctl.conf") > while line = fd.readline(): > print line, > fd.close() Python doesn't have assignment expressions like C. Try this: fd = open("/etc/sysctl.conf") for line in fd: print line, fd.close() this uses the fact that looping through an file descriptor iterates through it line by line. -- http://mail.python.org/mailman/listinfo/python-list