Did I find the right examples for you? yes no

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)

        def make_spec(parts):
    spec = ""
    for part in parts:
        if isinstance(part, kurt.Insert):
            insert = part
            part = SHAPE_INSERTS[insert.shape]
            if insert.kind:
                part += "." + insert.kind
        spec += part
    return spec
        


src/k/u/kurt-2.0.5/kurt/scratch20/__init__.py   kurt(Download)
from kurt.plugin import Kurt, KurtPlugin
 
from kurt.scratch20.blocks import make_block_types, custom_block, make_spec
 
 
    def save_block(self, block):
        if isinstance(block.type, kurt.CustomBlockType):
            spec = make_spec(block.type.parts)
            prefix = ['call', spec]
            command = None
        if command == 'procDef':
            cb = block.args[0]
            spec = make_spec(cb.parts)
            input_names = [i.name for i in cb.inserts]
            return ['procDef', spec, input_names, cb.defaults, cb.is_atomic]

src/k/u/kurt-HEAD/kurt/scratch20/__init__.py   kurt(Download)
from kurt.plugin import Kurt, KurtPlugin
 
from kurt.scratch20.blocks import make_block_types, custom_block, make_spec
 
 
    def save_block(self, block):
        if isinstance(block.type, kurt.CustomBlockType):
            spec = make_spec(block.type.parts)
            prefix = ['call', spec]
            command = None
        if command == 'procDef':
            cb = block.args[0]
            spec = make_spec(cb.parts)
            input_names = [i.name for i in cb.inserts]
            return ['procDef', spec, input_names, cb.defaults, cb.is_atomic]