comparison autobot/template.py @ 59:e66165f2f31b

complete automagic imports
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 10 Jan 2011 22:40:18 -0800
parents ddcc1f5491aa
children 2a5fa6876e48
comparison
equal deleted inserted replaced
58:008404759e4f 59:e66165f2f31b
8 import sys 8 import sys
9 from makeitso.cli import MakeItSoCLI 9 from makeitso.cli import MakeItSoCLI
10 from makeitso.template import assemble 10 from makeitso.template import assemble
11 from makeitso.template import MakeItSoTemplate 11 from makeitso.template import MakeItSoTemplate
12 from makeitso.template import Variable 12 from makeitso.template import Variable
13 from projects import descriptions
13 from projects import factories 14 from projects import factories
14 from StringIO import StringIO 15 from StringIO import StringIO
15 16
16 try: 17 try:
17 from subprocess import check_call as call 18 from subprocess import check_call as call
23 24
24 buffer = StringIO() 25 buffer = StringIO()
25 print >> buffer, 'Factories:\n' 26 print >> buffer, 'Factories:\n'
26 for key in sorted(factories.keys()): 27 for key in sorted(factories.keys()):
27 print >> buffer, '%s:' % key 28 print >> buffer, '%s:' % key
28 print >> buffer, getattr(factories[key], '__doc__', '').strip() 29 print >> buffer, descriptions[key]
29 print >> buffer 30 print >> buffer
30 return buffer.getvalue() 31 return buffer.getvalue()
31 32
32 33
33 class AutobotMasterTemplate(MakeItSoTemplate): 34 class AutobotMasterTemplate(MakeItSoTemplate):