Skip to content

Commit

Permalink
Pritty printing functions for repoman objects. Needs work!
Browse files Browse the repository at this point in the history
  • Loading branch information
mvliet committed Jan 25, 2011
1 parent d689dbe commit 9a34718
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions repoman-client/repoman_client/display.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from pprint import pprint


# Single line listings of users/groups/images
def display_user(user, long=False):
pprint(user)

def display_image(image, long=False):
pprint(image)

def display_group(group, long=False):
pprint(group)

def display_user_list(users, long=False):
for user in users:
display_user(user, long)

def display_image_list(images, long=False):
for image in images:
display_image(image, long)

def display_group_list(groups, long=False):
for group in groups:
display_group(group, long)


# detailed descriptions of user/groups/images
def describe_user(user, long=False):
pprint(user)

def describe_group(group, long=False):
pprint(group)

def describe_image(image, long=False):
pprint(image)

0 comments on commit 9a34718

Please sign in to comment.