14 lines
351 B
Python
14 lines
351 B
Python
import textwrap
|
|
|
|
|
|
class Script(list):
|
|
def __str__(self):
|
|
if not getattr(self, '_postconfig', False):
|
|
if hasattr(self, 'post_config'):
|
|
self.post_config()
|
|
self._postconfig = True
|
|
return '\n'.join([
|
|
textwrap.dedent(line.lstrip('\n')).strip()
|
|
for line in self
|
|
])
|