def lint_user_code(self, data): file_, ext = os.path.split(self.options.target) file_ += "pre" + ext fd = open(file_, "w") fd.write(data) fd.close() jsl = JavaScriptLint() jsl.path = file_ if not jsl.lint(): print jsl.output_reg print jsl.output_err sys.exit(1) os.remove(file_)