Module _ctypes
[hide private]
[frames] | no frames]

Module _ctypes

Create and manipulate C compatible data types in Python.


Version: 1.0.1

Classes [hide private]
  Array
XXX to be provided
  CFuncPtr
Function Pointer
  Structure
Structure base class
  Union
Union base class
  _Pointer
XXX to be provided
  _SimpleCData
XXX to be provided
Functions [hide private]
 
PyObj_FromPtr(...)
 
Py_DECREF(...)
 
Py_INCREF(...)
 
addressof(...)
addressof(C instance) -> integer Return the address of the C instance internal buffer
 
alignment(...)
alignment(C type) -> integer alignment(C instance) -> integer Return the alignment requirements of a C instance
 
byref(...)
byref(C instance) -> byref-object Return a pointer lookalike to a C instance, only usable as function argument
 
call_cdeclfunction(...)
 
call_function(...)
 
dlclose(...)
dlclose a library
 
dlopen(...)
dlopen(name, flag={RTLD_GLOBAL|RTLD_LOCAL}) open a shared library
 
dlsym(...)
find symbol in shared library
 
resize(...)
Resize the memory buffer of a ctypes instance
(previous-encoding, previous-errors)
set_conversion_mode(encoding, errors)
Set the encoding and error handling ctypes uses when converting between unicode and strings.
 
sizeof(...)
sizeof(C type) -> integer sizeof(C instance) -> integer Return the size in bytes of a C instance
Variables [hide private]
  FUNCFLAG_CDECL = 1
  FUNCFLAG_PYTHONAPI = 4
  RTLD_GLOBAL = 256
  RTLD_LOCAL = 0
  _cast_addr = 1088699328
  _memmove_addr = 1074595344
  _memset_addr = 1074595456
  _string_at_addr = 1088694512
  _wstring_at_addr = 1088701232

Imports: ArgumentError


Function Details [hide private]

set_conversion_mode(encoding, errors)

 

Set the encoding and error handling ctypes uses when converting between unicode and strings. Returns the previous values.

Returns: (previous-encoding, previous-errors)