summaryrefslogtreecommitdiff
path: root/demo.py
blob: cb2e83080f2afbe9beb14fb50f698c633d66a5de (plain)
1
2
3
4
5
6
7
8
9
10
11
import skdb, yaml
from copy import deepcopy
lego = skdb.load_package('lego')
lego.load_data()
brick1 = deepcopy(lego.parts[0])
brick1.post_init_hook() #not sure why this isnt called automatically
brick2 = deepcopy(lego.parts[0])
brick2.post_init_hook()
for i in brick1.interfaces:
    print "brick1's "+i.name+" is compatible with: ", [x.interface2.name for x in i.options([brick1, brick2])]