ValvePython / vdf

📜 Package for working with Valve's text and binary KeyValue format
https://pypi.org/project/vdf/
MIT License
167 stars 32 forks source link

VDFDict #8

Closed rossengeorgiev closed 8 years ago

SleepProgger commented 8 years ago

Thanks. Looks nicer now.

rossengeorgiev commented 8 years ago

Does this work for the PICS case?

SleepProgger commented 8 years ago

Looks good:

    from vdf import VDFDict, binary_loads
    with open('products/p_34719.bvdf', 'rb') as fp:
        print binary_loads(fp.read(), VDFDict).values()[0]['AppItems']

VDFDict([('8500', VDFDict([('0', 220003)])), ('8500', VDFDict([('1', 220015)]))])