You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*This section is semi-automatically generated by the [ReadMe-auto.py](./ReadMe-auto.py).*
Here is an example.
You can pass an SGF filepath to the `sgf_parse()` function. Please read [tree.py](sgfutil/tree.py) for the data types defined for this `SgfParser()` class.
"""
from sgfutil import SgfParserNative, SgfParser
parser = SgfParser()
parser.sgf_parse('demo/Eg-multiple-branches.sgf')
print(parser)
"""
Or you can use `SgfParseNative()` class instead. In this case, the parsed results are saved with native Python data structures (a combination of lists, tuples, etc.):