<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def process_file(self, filename):
 """Processing one file."""

        if self.config.dry_run:
            if not self.config.internal:
                self.logger.info("Dry run mode for script %s", filename)
            with open(filename) as handle:
                for line in handle:
                    yield line[0:-1] if line[-1] == '\n' else line
        else:
            if not self.config.internal:
                self.logger.info("Running script %s", filename)
            for line in self.process_script(filename):
                yield line