def config_pint(self, value=False): if value: self._use_pint = True else: self._use_pint = False hszinc.use_pint(self._use_pint)
# -*- coding: utf-8 -*- # Zinc dumping and parsing module # (C) 2016 VRT Systems # # vim: set ts=4 sts=4 et tw=78 sw=4 si: import hszinc import datetime import math import pytz import json # These are examples taken from http://project-haystack.org/doc/Zinc hszinc.use_pint() SIMPLE_EXAMPLE='''ver:"2.0" firstName,bday "Jack",1973-07-23 "Jill",1975-11-15 ''' SIMPLE_EXAMPLE_JSON={ 'meta': {'ver':'2.0'}, 'cols': [ {'name':'firstName'}, {'name':'bday'}, ], 'rows': [ {'firstName': 's:Jack', 'bday':'d:1973-07-23'}, {'firstName': 's:Jill', 'bday':'d:1975-11-15'},
def _enable_pint(pint_en): hszinc.use_pint(pint_en)