Python 3 compatibility:
 - Used absolute imports
 - Encoded a string using the default string encoding to get a bytes
   instance to pass to c_char