hi list,

I am using SUDS to talk with a web service written by C#. The service will
crawl a web page, then return its content as bytes.

it's something like:

>>> from suds.client import Client
>>> url = "http://WSServer/Service1.asmx?wsdl";
>>> client = Client(url)
>>> page = client.service.GetURLContent("http://www.google.cn";)
>>> print page
(CrawlResult){
   crawStatus = "SUCC"
   rawByte = "PGh0bWw+PGhlYWQ+PG1ldGEgaHR0cC1lcXVpdj0iY29udGVudC10eXBlIiBjb2
... "

the problem is I need to convert the rawByte from string to bytes, then
explain it as text with encoding (like "UTF-8").

Any simple way to convert this string back to bytes? I am not clear with
that.

Thanks,
Daniel.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to