def ParseAndUnwrap(code, dumptree=False):
 tree = pytree_utils.ParseCodeToTree(code)
 comment_splicer.SpliceComments(tree)
 continuation_splicer.SpliceContinuations(tree)
 subtype_assigner.AssignSubtypes(tree)
 split_penalty.ComputeSplitPenalties(tree)
 blank_line_calculator.CalculateBlankLines(tree)
 if dumptree:
  pytree_visitor.DumpPyTree(tree, target_stream=sys.stderr)
 uwlines = pytree_unwrapper.UnwrapPyTree(tree)
 for uwl in uwlines:
  uwl.CalculateFormattingInformation()
 return uwlines

def ParseAndUnwrap ( code , dumptree = False ) : tree = pytree_utils . ParseCodeToTree ( code ) comment_splicer . SpliceComments ( tree ) continuation_splicer . SpliceContinuations ( tree ) subtype_assigner . AssignSubtypes ( tree ) split_penalty . ComputeSplitPenalties ( tree ) blank_line_calculator . CalculateBlankLines ( tree ) if dumptree : pytree_visitor . DumpPyTree ( tree , target_stream = sys . stderr ) uwlines = pytree_unwrapper . UnwrapPyTree ( tree ) for uwl in uwlines : uwl . CalculateFormattingInformation ( ) return uwlines
produces unwrapped lines from the given code .