From affc7674bed1f1e0f63632bf7938e75133a37a81 Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Aug 04 2016 12:29:53 +0000 Subject: Closes #18 list images from server --- diff --git a/brumeclient/brume.py b/brumeclient/brume.py index 7c32c45..1796203 100755 --- a/brumeclient/brume.py +++ b/brumeclient/brume.py @@ -89,9 +89,12 @@ if __name__ == '__main__': res = requests.post(url="http://127.0.0.1:5000/api/v1/", headers=headers, data=data) # Now print the results based on the command given if args.list_images: + # TODO: Please fix the print output to look nice data = json.loads(res.text) + print("Name\t\tDescription") + print("-" * 40) for img in data['images']: - print("{0} {1}".format(img[0],img[1])) + print("%10s %-15s" % (img[0],img[1])) else: print(res.text)