"3c273" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Or is this what you mean?
> -----begin-----
> import urllib
> urlfile = open('c:\\temp\\url.txt', 'r')
> newurlfile = open('c:\\temp\\newurls.html', 'w')
> newurlfile.write('<html> \n<body>\n')
> for lines in urlfile:
>     try:
>         if lines == '\n':
>             pass
>         else:
>             lines = '<a href="' + lines.strip() +'">'\
>              + lines.strip() + '</a>' + '<br>\n'
>             newurlfile.write(lines)
>     except:
>         pass
> newurlfile.write('</body> \n</html>')
> urlfile.close()
> newurlfile.close()
> -----end-----
> Louis
>
Oops, I guess we don't need "import urllib" anymore.
Louis


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to