# Path: momo/utils.py
# MIN_PAGE_LINES = 50
# PY3 = sys.version_info[0] == 3
# def eval_path(path):
# def smart_print(*args, **kwargs):
# def utf8_decode(s):
# def utf8_encode(s):
# def run_cmd(cmd_str=None, cmd=None, cmd_args=None, stdout=sys.stdout,
#             stderr=sys.stderr, stdin=None):
# def open_default(path):
# def mkdir_p(path):
# def page_lines(lines):


from momo.utils import run_cmd, open_default, txt_type
import re
        attr = self.get_attr(attrname)
        if isinstance(attr.content, list):
            res = []
            for item in attr.content:
                if self.is_expandable(item):
                    item = self.expand_str(item, attrname)
                    res.append(item)
                else:
                    res.append(item)
            return res
        else:
            res = attr.content
            if self.is_expandable(res):
                res = self.expand_str(res, attrname)
            return res

    def expand_str(self, s, exclude=None):
        """
        Expand a string.

        :param exclude: the attribute name to exclude from expansion.
        """
        subs = self._get_expand_subs()
        t = s.replace('{}', '{%s}' % self.default_attrname)
        if exclude is not None:
            del subs[exclude]
        return t.format(**subs)

    @staticmethod
    def is_expandable(s):

# Path: momo/utils.py
# MIN_PAGE_LINES = 50
# PY3 = sys.version_info[0] == 3
# def eval_path(path):
# def smart_print(*args, **kwargs):
# def utf8_decode(s):
# def utf8_encode(s):
# def run_cmd(cmd_str=None, cmd=None, cmd_args=None, stdout=sys.stdout,
#             stderr=sys.stderr, stdin=None):
# def open_default(path):
# def mkdir_p(path):
# def page_lines(lines):


# Path: momo/actions.py
from momo.utils import run_cmd, open_default, txt_type
import re

        attr = self.get_attr(attrname)
        if isinstance(attr.content, list):
            res = []
            for item in attr.content:
                if self.is_expandable(item):
                    item = self.expand_str(item, attrname)
                    res.append(item)
                else:
                    res.append(item)
            return res
        else:
            res = attr.content
            if self.is_expandable(res):
                res = self.expand_str(res, attrname)
            return res

    def expand_str(self, s, exclude=None):
        """
        Expand a string.

        :param exclude: the attribute name to exclude from expansion.
        """
        subs = self._get_expand_subs()
        t = s.replace('{}', '{%s}' % self.default_attrname)
        if exclude is not None:
            del subs[exclude]
        return t.format(**subs)

    @staticmethod
    def is_expandable(s):

        if isinstance(s, txt_type):