TopDl: example1.py

File example1.py, 391 bytes (added by faber, 12 years ago)

Python topdl example

Line 
1#!/usr/bin/env python
2
3from deter import topdl
4
5top = 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        )
14print topdl.topology_to_xml(top, top='experiment')