title: How do you pass kwargs to a boost-python wrapped function?
body: <p>I have a python function with this signature:</p>
  
  <pre><code>def post_message(self, message, *args, **kwargs):
  </code></pre>
  
  <p>I would like to call the function from c++ and pass to it some kwargs. Calling the function is not the problem. Knowing how to pass the kwargs is. Here is a non-working paraphrased sample:</p>
  
  <pre><code>std::string message("aMessage");
  boost::python::list arguments;
  arguments.append("1");
  
  boost::python::dict options;
  options["source"] = "cpp";
  
  boost::python::object python_func = get_python_func_of_wrapped_object()
  python_func(message, arguments, options)
  </code></pre>
  
  <p>When I exercise this code, in pdb I get (which is not what I would like):</p>
  
  <pre><code>messsage = aMessage
  args = (['1'], {'source': 'cpp'})
  kwargs = {}
  </code></pre>
  
  <p>How do you pass the <em>options</em> in my example in the **kwargs dictionary ?</p>
  
  <p>I have seen one <a href="http://boost.2283326.n4.nabble.com/boost-python-call-python-function-with-kwargs-from-c-td2703011.html">post</a> suggesting to use the **options syntax (how cool is this!):</p>
  
  <pre><code>python_func(message, arguments, **options)
  </code></pre>
  
  <p>Unfortunately, this results in</p>
  
  <pre><code>TypeError: No to_python (by-value) converter found for C++ type: class boost::python::detail::kwds_proxy
  </code></pre>
  
  <p>Thank you for any help you can give.</p>