TopDl: example1.py
File example1.py, 391 bytes (added by , 12 years ago) |
---|
Line | |
---|---|
1 | #!/usr/bin/env python |
2 | |
3 | from deter import topdl |
4 | |
5 | top = topdl.Topology(substrates=[ topdl.Substrate(name='link0')], |
6 | elements=[ |
7 | topdl.Computer(name='a', interface=[ |
8 | topdl.Interface(name='inf000', substrate=['link0'])] |
9 | ), |
10 | topdl.Computer(name='b', interface=[ |
11 | topdl.Interface(name='inf000', substrate=['link0'])], |
12 | )] |
13 | ) |
14 | print topdl.topology_to_xml(top, top='experiment') |