The new input frame does not inherit the parent frames lexicology. In particular, the warning character is restablished as @. This command reasserts document mode, both in the included file and the current one.
The command include_source is a generalisation of include_file which takes any source driver as the input.
370: #line 496 "input_frame.ipk" 371: def include_file(self,name,encoding=None): 372: "Include an interscruot file" 373: if 'input' in self.process.trace: 374: print 'input from',name 375: file_signature = (self.depth+1,'interscript',name) 376: if file_signature in self.pass_frame.skiplist: 377: print 'SKIPPING INCLUDE FILE',file_signature 378: i = 0 379: t = self.master.src_tree 380: n = len(t) 381: while i<n: 382: if file_signature == tuple(t[i][0:3]): break 383: i = i + 1 384: if i == n: 385: print 'COULD NOT FIND SKIP FILE',file_signature,'in',t 386: else: 387: self.pass_frame.include_files.append(file_signature) 388: i = i + 1 389: lev = file_signature[0] 390: while i<n: 391: if t[i][0] >= lev: break 392: print 'INSERTING',t[i][2],'into include file list (cheating)' 393: self.pass_frame.include_files.append(tuple(t[i][0:3])) 394: i = i + 1 395: else: 396: self.pass_frame.include_files.append(file_signature) 397: if encoding is None: 398: encoding = self.source.encoding_name 399: self.include_source(named_file_source( 400: self.pass_frame,name, self.source.directory, encoding=encoding)) 401: 402: def include_source(self,source): 403: "Include an interscript source" 404: self.select(None) 405: ho = self.head_offset 406: inpt = input_frame( 407: self.pass_frame, 408: source, 409: [], 410: self.current_weaver, 411: self.userdict.copy(), 412: self.depth+1) 413: inpt.head_offset = ho 414: inpt.set_warning_character(python='@') 415: inpt.file_pass() 416: self.current_weaver.set_original_filename (self.original_filename) 417: