6.19.10.1. The input frame

Note the horrid hack: the reg_list is a list of pairs, the second entry is a method which should be bound to this frame, but the frame isn't built yet. So the caller must pass an empty list, and populate it after the frame is constructed.

This has to be fixed.

Start python section to interscript/frames/inputf.py[2 /42 ] Next Prev First Last
    58: #line 98 "input_frame.ipk"
    59: class input_frame:
    60: 
    61:   def __init__(self, pass_frame, src, reg_list, weaver, userdict, depth):
    62:     # the display
    63:     self.pass_frame = pass_frame
    64:     self.master = pass_frame.master
    65:     self.process = self.master.process
    66:     self.global_frame = self.process.global_frame
    67: 
    68:     self.current_weaver = weaver
    69:     self.current_weaver_stack = []
    70: 
    71:     self.depth = depth
    72:     self.source = src
    73:     self.userdict = userdict
    74:     self.reg_list = reg_list
    75:     self.read_buffer = []
    76: 
    77:     self.current_tangler_stack = []
    78:     self.current_tangler = None
    79:     self.line_offset = 0
    80:     self.original_filename = src.get_source_name()
    81:     self.original_count = self.line_offset
    82:     self.current_weaver.set_original_filename(self.original_filename)
    83:     self.head_offset = 0
    84:     self.tabwidth = self.master.tabwidth
    85: 
    86:     self.cont_re = re.compile('^$|^ (.*)$')
    87:     self.any_line_re = re.compile('^(.*)$')
    88: 
    89:     if 'frames' in self.process.trace:
    90:       self.process.acquire_object(self, 'INPUT FRAME['+str(depth)+']='+src.get_source_name())
    91:     self.post_methods()
    92: 
    93:   def __del__(self):
    94:     if 'frames' in self.process.trace:
    95:       self.process.release_object(self)
    96: 
    97:   def get_input_frame(self): return self
    98: 
End python section to interscript/frames/inputf.py[2]


6.19.10.1.1. Post user methods
6.19.10.1.2. help
6.19.10.1.3. close
6.19.10.1.4. Process file data