def get(self):
   response = ec2.ec2_describe_instances().replace("\n", "<br /><br />")
   if response == "":
     response = "No instances are currently running."
   self.response.out.write(template.render('index.html',
                                           {'tool': 'EC2 Describe Instances',
                                            'result': response}))
 def get(self):
   response = ec2.ec2_describe_instances()
   images_up = re.findall('\ti-[\d\w]+\t', response)
   opts = {"ids":images_up}
   response = ec2.ec2_terminate_instances(opts).replace("\n", "<br /><br />")
   self.response.out.write(template.render('index.html',
                                           {'tool': 'Terminate all instances',
                                            'result': response}))