def TemplatePrint(self, Task): ''' This function will print to the console the output of the email. ''' try: EmailRender = Task.Render() RenderName = Task.RenderName with open(RenderName, "w+") as myfile: myfile.write(EmailRender) try: # time.sleep(0) temp = "\n" temp += subprocess.check_output(["w3m", "-dump", "-T", "text/html", RenderName]) print Helpers.Reindent(temp, 1) # time.sleep(5) except Exception as e: print Helpers.color(" [!] Is w3m installed (run Setup.sh)?") print e # now remove temp file # time.sleep(2) os.remove(RenderName) except Exception as e: print e