示例#1
0
文件: py_meta.py 项目: 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
示例#2
0
文件: runtime.py 项目: 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
示例#3
0
 def NewTempBuffer(self):
   return TextOutput(util.Buffer())
示例#4
0
 def NewTempBuffer(self):
   return AnsiOutput(util.Buffer())
示例#5
0
 def NewTempBuffer(self):
   return HtmlOutput(util.Buffer())