You need to use brackets around print
in python 3. print (htmltext)
should solve your problem.
http://docs.python.org/3.3/library/functions.html#print
Edit: @Ashwini already stated that until I wrote this. I think you/he should write that in answers so it can be accepted.