def create_unicode_buffer(init, size=None):
 if isinstance(init, str):
  if (size is None):
   size = (len(init) + 1)
  buftype = (c_wchar * size)
  buf = buftype()
  buf.value = init
  return buf
 elif isinstance(init, int):
  buftype = (c_wchar * init)
  buf = buftype()
  return buf
 raise TypeError(init)

def create_unicode_buffer ( init , size = None ) : if isinstance ( init , str ) : if ( size is None ) : size = ( len ( init ) + 1 ) buftype = ( c_wchar * size ) buf = buftype ( ) buf . value = init return buf elif isinstance ( init , int ) : buftype = ( c_wchar * init ) buf = buftype ( ) return buf raise TypeError ( init )
create_unicode_buffer -> character array create_unicode_buffer -> character array create_unicode_buffer -> character array .