def _get_tool_source(self, source_file_name=None, source_contents=None): if source_file_name is None: source_file_name = self.source_file_name if source_contents is None: source_contents = self.source_contents path = os.path.join(self.temp_directory, source_file_name) open(path, "w").write(source_contents) tool_source = get_tool_source(path) return tool_source
def _tool_source(self): path = os.path.join(self.temp_directory, self.source_file_name) open(path, "w").write(self.source_contents) tool_source = get_tool_source(path) return tool_source