1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/usr/bin/python
#
# Copyright (C) 2007-2013 Xagasoft, All rights reserved.
#
# This file is part of the libgats library and is released under the
# terms of the license contained in the file LICENSE.
#
import gats
print isinstance( True, bool )
print isinstance( True, int )
print isinstance( 1, bool )
print isinstance( 1, int )
print gats.loads( gats.dumps( [0, 1, 2, 3, None, {'hi': None, 'bye': 1}] ) )
gats.dump( [0, 1, 2, 3, None, {'hi': None, 'bye': 1}], open('test.gats', 'w') )
gats.dump( 'hello', open('test-str.gats', 'w') )
|