3 # www7.py -- display the contents of a URL in a Text widget
5 # - make window resizable
6 # - update display while reading
13 if len(sys
.argv
) != 2 or sys
.argv
[1][:1] == '-':
14 print "Usage:", sys
.argv
[0], "url"
17 fp
= urllib
.urlopen(url
)
23 text
.pack({'expand': 1, 'fill': 'both'})
28 text
.insert('end', line
)
29 root
.update_idletasks() # Update display