Exemplo n.º 1
0
Arquivo: py_meta.py Projeto: silky/oil
 def __repr__(self):
     ast_f = fmt.TextOutput(util.Buffer())  # No color by default.
     #ast_f = fmt.AnsiOutput(io.StringIO())
     tree = fmt.MakeTree(self)
     fmt.PrintTree(tree, ast_f)
     s, _ = ast_f.GetRaw()
     return s
Exemplo n.º 2
0
Arquivo: runtime.py Projeto: bsa3/oil
 def __repr__(self):
   # TODO: Break this circular dependency.
   from asdl import format as fmt
   ast_f = fmt.TextOutput(util.Buffer())  # No color by default.
   tree = fmt.MakeTree(self)
   fmt.PrintTree(tree, ast_f)
   s, _ = ast_f.GetRaw()
   return s
Exemplo n.º 3
0
 def NewTempBuffer(self):
   return TextOutput(util.Buffer())
Exemplo n.º 4
0
 def NewTempBuffer(self):
   return AnsiOutput(util.Buffer())
Exemplo n.º 5
0
 def NewTempBuffer(self):
   return HtmlOutput(util.Buffer())