@select(archive) @untangle('fred.pak') @untangle('joe.pak')This mechanism is required to support include files, since a top level document is incomplete otherwise.
Note that the inserted code is not woven! In fact, the tangler never sees it, it simply supplies the sink object.
557: #line 767 "input_frame.ipk" 558: def untangle(self,name): 559: if not self.current_tangler: 560: raise 'untangle without active tangler' 561: f = open(name) 562: data = f.readlines() 563: f.close() 564: self.current_tangler.sink.writeline('@select(output("'+name+'"))') 565: for line in data: 566: l = string.rstrip(line) 567: if len(l): 568: if l[0]=='@': l = '@'+l 569: self.inpt.tangler.sink.writeline(l) 570: self.current_tangler.sink.writeline('@select(None)') 571: self.current_tangler.weaver.begin_small() 572: self.current_tangler.weaver.writeline('Included '+name+', '+str(len(data))+' lines.') 573: self.current_tangler.weaver.end_small() 574: self.current_tangler.weaver.line_break() 575: