# Argumentos interesantes
obj = sys.argv[1]
+try:
+ pos = obj.index('.')
+ attr = obj[pos+1:]
+ obj = obj[:pos]
+except:
+ attr = None
cmd = sys.argv[2]
oid = None
args = sys.argv[3:]
else:
objs = eval(obj).select(connection=conn)
for o in objs:
- print o
+ if attr is None:
+ print o
+ else:
+ print o
+ print attr + ':'
+ import pprint
+ attr = eval('o.' + attr)
+ pprint.pprint(attr)
elif cmd in ('rm', 'remove', 'delete', 'del'):
if oid is not None:
objs = [eval(obj).get(oid, connection=conn)]