Future Googlers might like this thread to end with the Thomas Heller's brief conclusive review:
/// Copied 2006-09-28 from /// http://starship.python.net/crew/theller/moin.cgi/CodeSnippets 1.2 Check for NULL ctypes pointers The truth value of any NULL ctypes pointer instance is False. So, this C code if (pv == NULL) /* handle NULL pointer */ else /* handle non-NULL pointer */ translates to this Python code if not pv: # handle NULL pointer else: # handle non-NULL pointer The above is true for instances of c_void_p, c_char_p, c_wchar_p, and POINTER(some_ctype). /// -- http://mail.python.org/mailman/listinfo/python-list