On 7/4/2013 3:47 PM, Robert Winkler wrote:
Thanks to the OSA library, which works for SOAP requests with Python
3.x, I can now use SOAP services at http://www.chemspider.com.
The result is a list of accession numbers (which correspond to
chemical compounds) and I get them in the following format:
(ArrayOfInt){int[]=[5744,69182,292,68027,3404131,82616,18280,11200,704646,543430...]}
How could I transform this to a simple python list?
[5744, 69182, 292,68027, 3404131, 82616, 18280, 11200, 704646, 543430 ...]
Conversion to a numpy array
How did you do that?
[snip] since the structure is maintained; the numpy.shape returns ().
Huh? Makes no sense to me. Please explain.
I assume "the following format" is a character string.
How do you convert characters to integers - hint - int()
So try applying int() to each accession number and collecting the
results in a list.
--
Bob Gailer
919-636-4239
Chapel Hill NC
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor