libbe.command.show

class libbe.command.show.Show(*args, **kwargs)

Show a particular bug, comment, or combination of both.

>>> import sys
>>> import libbe.bugdir
>>> bd = libbe.bugdir.SimpleBugDir(memory=False)
>>> io = libbe.command.StringInputOutput()
>>> io.stdout = sys.stdout
>>> io.stdout.encoding = 'ascii'
>>> ui = libbe.command.UserInterface(io=io)
>>> ui.storage_callbacks.set_bugdir(bd)
>>> cmd = Show(ui=ui)
>>> ret = ui.run(cmd, args=['/a',])  
          ID : a
  Short name : abc/a
    Severity : minor
      Status : open
    Assigned : 
    Reporter : 
     Creator : John Doe <jdoe@example.com>
     Created : ...
Bug A
>>> ret = ui.run(cmd, {'xml':True}, ['/a'])  
<?xml version="1.0" encoding="..." ?>
<be-xml>
  <version>
    <tag>...</tag>
    <committer>...</committer>
    <date>...</date>
    <revision>...</revision>
  </version>
  <bug>
    <uuid>a</uuid>
    <short-name>abc/a</short-name>
    <severity>minor</severity>
    <status>open</status>
    <creator>John Doe &lt;jdoe@example.com&gt;</creator>
    <created>Thu, 01 Jan 1970 00:00:00 +0000</created>
    <summary>Bug A</summary>
  </bug>
</be-xml>
>>> ui.cleanup()
>>> bd.cleanup()

Methods

cleanup()
complete([argument, fragment])
help(*args)
run([options, args])
usage()
name = 'show'
libbe.command.show.output(bd, ids, encoding, as_xml=True, with_comments=True)

This Page