import urllib.requesturl ="https://raw.githubusercontent.com/NeuroML/NeuroML2/master/examples/NML2_InstanceBasedNetwork.nml"with urllib.request.urlopen(url) as resp: text = resp.read().decode()# Show network structurein_network =Falsefor line in text.split('\n'):if'<network'in line: in_network =Trueif in_network:print(line.rstrip()[:100])if'</network'in line:break
<network id="InstanceBasedNetwork">
<population id="iafCells" type="populationList" component="iaf" size="3">
<instance id="0">
<location x="120" y="230" z="567"/>
</instance>
<instance id="1">
<location x="270" y="450" z="56"/>
</instance>
<instance id="2">
<location x="54" y="234" z="89"/>
</instance>
</population>
<projection id="internal1" presynapticPopulation="iafCells" postsynapticPopulation="iafCells
<!--TODO: Fix! want to define synapse in here, so that multiple synapses per connection
<synapseComponent component="syn1"/>-->
<!--TODO: Fix! want to use preCellId="0" -->
<connection id="0" preCellId="../iafCells/0/iaf" postCellId="../iafCells/1/iaf"/>
</projection>
<projection id="internal2" presynapticPopulation="iafCells" postsynapticPopulation="iafCells
<connection id="0" preCellId="../iafCells/0/iaf" postCellId="../iafCells/2/iaf"/>
</projection>
<inputList id="stimInput" component="pulseGen1" population="iafCells">
<!--TODO: Fix! want to use target="0" -->
<input id="0" target="../iafCells/0/iaf" destination="synapses"/>
</inputList>
</network>