Well, that alternative view rocks hard...

pull/4/head
Darksider3 5 years ago
parent b368ea058c
commit cab4cd25a2

@ -16,6 +16,9 @@ class ListUsers:
query = "SELECT * FROM `applications` WHERE status = '0'"
self.usersFetch = self.db.query(query)
def prettyPrint(self):
pass # see below why not implemented yet, texttable...
def getFetch(self):
return self.usersFetch
@ -41,9 +44,16 @@ print(t.draw())
| Bob | 19 |
+-------+-----+
"""
for user in fetch:
print("ID: {}; Username: \"{}\"; Mail: {}; Name: \"{}\"; Registered: {}; Status: {}".format(
user["id"], user["username"], user["email"], user["name"], user["timestamp"], user["status"]
))"""
print("ID %-1s| Username %-5s| Mail %-20s| Name %-17s| Registered %-8s| State |" % (
" ", " ", " ", " ", " "
))
print(101*"-")
for user in fetch:
print("ID: {}; Username: \"{}\"; Mail: <{}>; Name: \"{}\"; Registered: {}; Status: {}".format(
print("%-4i| %-14s| %-25s| %-22s| %-8s| %-6i|" % (
user["id"], user["username"], user["email"], user["name"], user["timestamp"], user["status"]
))
exit(0)

Loading…
Cancel
Save