title: Which python argument type would be accepted as char* in python C extension
body: <p>I wrote a simple Python extension using C++ like:</p>
  
  <pre><code>class Foo
  {
     public:
       void Test(char* inbuffer);
  };
  </code></pre>
  
  <p>I used the Swig to generate wrapper in the extension.</p>
  
  <p>But I failed to test this function by either passing the string or bytes array like</p>
  
  <pre><code>myobj= foo.Foo()
  keydata = "abcd"
  myobj.Test(keydata)
  </code></pre>
  
  <p>I got errors as: </p>
  
  <blockquote>
    <p>TypeError: in method 'Test', argument 2 of type 'char *'</p>
  </blockquote>
  
  <p>Do you have any suggestions?</p>