1367: #line 1730 "input_frame.ipk"
1368: def begin_displayed_code(self):
1369: "Begin display of verbatim code"
1370: self.current_weaver.begin_displayed_code()
1371:
1372: def end_displayed_code(self):
1373: self.current_weaver.end_displayed_code()
1374:
1375:
1376:
1377: def display_code(self,name,kind='code'):
1378: "Display the external file as code"
1379: self.pass_frame.include_files.append((self.depth+1,kind,name))
1380: self.begin_displayed_code()
1381: filename = parse_source_filename(name, self.source.directory)[3]
1382: f = open(filename)
1383: data = f.readlines()
1384: f.close()
1385: weaver = self.get_weaver()
1386: for line in data:
1387: l = string.rstrip(line)
1388: weaver.writeline(l)
1389: self.end_displayed_code()
1390: