code: def create_string_buffer(init, size=None):
      
      if isinstance(init, (str, unicode)):
          if size is None:
              size = len(init) + 1
          buftype = c_char * size
          buf = buftype()
          buf.value = init
          return buf
      elif isinstance(init, (int, long)):
          buftype = c_char * init
          buf = buftype()
          return buf
      raise TypeError, init
docs: create_string_buffer(aString) -> character array
      create_string_buffer(anInteger) -> character array
      create_string_buffer(aString, anInteger) -> character array