<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def directory_complete(self, text, line, begidx, endidx):
 """Figure out what directories match the completion."""

        return [filename for filename in self.filename_complete(text, line, begidx, endidx) if filename[-1] == '/']