コード例 #1
0
ファイル: session.py プロジェクト: kylevgross/pyhaystack
 def config_pint(self, value=False):
     if value:
         self._use_pint = True
     else:
         self._use_pint = False
     hszinc.use_pint(self._use_pint)
コード例 #2
0
ファイル: test_parser_pint.py プロジェクト: vrtsystems/hszinc
# -*- 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'},
コード例 #3
0
ファイル: pint_enable.py プロジェクト: widesky/hszinc
 def _enable_pint(pint_en):
     hszinc.use_pint(pint_en)
コード例 #4
0
 def config_pint(self, value=False):
     if value:
         self._use_pint = True
     else:
         self._use_pint = False
     hszinc.use_pint(self._use_pint)