I am trying to connect to server that responds with XML.
Here is the error I see:
Traceback (most recent call last):
File "<string>", line 1, in ?
TypeError: unsubscriptable object
I tried the same thing on windows using serverHttp object in MSXML and
get the response
Correctly in windows machine.
On Linux I am trying to the samething..
Post to a Url and read the response XML.
- Raja
-----Original Message-----
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of David Abrahams
Sent: Saturday, August 18, 2007 1:15 PM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Can Python "httplib" module be
directlyembeddedin C++ ?
on Fri Aug 17 2007, "Raja Cherukuri"
Thanks it works fine...how do check the return response... Using extract<string> or
doesn't seem to help..
What does it do?
Am I doing something wrong ?
You might try to figure out what's in response by printing it. Maybe respose["result"] is not a string, or else maybe it's unicode...
Here is the code:
boost::python::object response = gpPythonHttp->attr("urlopen")(m_sURI.c_str(),strXMLOutput.c_str()); boost::python::exec("result = read()", response); std::string res = boost::python::extractstd::string(response["result"]);
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users