It is just my on-line knowledge database. Full of strange content ....
czwartek, 28 listopada 2013
file reader python
#!/usr/bin/python
import time
try:
f = file('/etc/passwd')
while True:
line = f.readline()
if len(line) == 0:
break
time.sleep(2)
print line,
finally:
f.close()
print "cleaning up ... closed the file"
Brak komentarzy:
Prześlij komentarz