Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

Looking for better way to iterate through nodes

$
0
0

Currently I am doing

results = swis.query(sql_query)

in order to populate a list of nodes depending on which SWQL query I am using.  I suppose I don't fully understand the syntax, but I am looping through this list by doing:

 

 

for x in xrange(10000):  uri = results['results'][x][IP_Address]  swis.update(....)

 

 

I would like to have a better way to iterate through this list, but I don't fully understand how the list is generated and what results['results'][x][IP_Address] is doing.  I'd like some help understanding this further in order to hopefully come up with a cleaner way to iterate through the results list.


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>