Package pyamf :: Package adapters :: Module _array |
[hide private]
[frames] | no frames]

# Source Code for Module pyamf.adapters._array

     1  # Copyright (c) 2007-2009 The PyAMF Project.
     2  # See LICENSE.txt for details.
     3
     4  """
     5  `array` adapter module.
     6
     7  Will convert all array.array instances to a python list before encoding. All
     8  type information is lost (but degrades nicely).
     9
    10  @since: 0.5
    11  """
    12
    13  import array
    14
    15  import pyamf
    16  from pyamf.adapters import util
    17
    18
    19  if hasattr(array, 'array'):
    20      pyamf.add_type(array.ArrayType, util.to_list)
    21