Esempio n. 1
0
File: py_meta.py Progetto: 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
Esempio n. 2
0
File: runtime.py Progetto: 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
Esempio n. 3
0
 def NewTempBuffer(self):
   return TextOutput(util.Buffer())
Esempio n. 4
0
 def NewTempBuffer(self):
   return AnsiOutput(util.Buffer())
Esempio n. 5
0
 def NewTempBuffer(self):
   return HtmlOutput(util.Buffer())