#!/usr/bin/env python

#from ctypes import *

import sys
import ctypes
import pprint


# print ctypes.windll.kernel32 # doctest: +WINDOWS

dserver = ctypes.CDLL('dcl')

pprint.pprint(dserver.__dict__)

print type(dserver)

#dserver.dsInit.restype         = ctypes.c_char_p
dserver.dsInit.argtypes        = [ctypes.c_char_p, ctypes.c_int]
#dserver.dsRegister.restype     = ctypes.c_int
#dserver.dsRegister.argtypes    = [ctypes.c_char_p]
#dserver.dsGetNext.restype      = ctypes.c_char_p
#dserver.dsGetNext.argtypes     = [ctypes.c_int]
#dserver.dsGetKeyed.restype     = ctypes.c_char_p
#dserver.dsGetKeyed.argtypes    = [ctypes.c_int, ctypes.c_char_p]
#dserver.dsGetIndexed.restype   = ctypes.c_char_p
#dserver.dsGetIndexed.argtypes  = [ctypes.c_int, ctypes.c_int]
#dserver.dsStore.restype        = ctypes.c_int
#dserver.dsStore.argtypes       = [ctypes.c_int, ctypes.c_char_p]

s= 100 * ' '

dserver.get_buffered(1, s, 100)

print s

dserver.dsInit('localhost', 9578)

# idx = dserver.dsRegister('Sequence')

# dserver.dsGetNext(idx)


