Last active
December 17, 2015 12:08
-
-
Save libswan/5607174 to your computer and use it in GitHub Desktop.
Isn't there a way to programmatically figure out the connections? E.g. Instead of "telling the program" that node[0] connects with node[1], because the position of 'A' in these two nodes is position 0, can't we figure it out programmatically?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodeNameList = [] | |
for i in nodes: | |
nodeName = Node.getName(i) | |
nodeNameList.append(nodeName) | |
print nodeNameList | |
for n in nodeNameList[0]: | |
if nodeNameList[0].index(n) == nodeNameList[1].index(n): | |
connectionLetter = n | |
print connectionLetter | |
"""This is just comparing node element 1 (at position 0) to the next node element. But how would I compare the letters in one node element to the letters in all other node elements?""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment