def run(self):
head, tail = os.path.split(self.window.active_view().file_name())
CurrentWindowFileName = self.window.active_view().file_name().split('/')[-1].split('.')[0]
CurrentWindowFileType = self.window.active_view().file_name().split('/')[-1].split('.')[-1]
if os.path.isfile(CurrentWindowFileName) == False:
sublime.error_message("You have not complied your solution! Build the executable using sublime text")
return
inputFile = CurrentWindowFileName+"_input.in"
outputFile = CurrentWindowFileName+"_output.out"
if os.path.isfile(inputFile) == False:
print(os.path.isfile(inputFile), inputFile)
sublime.error_message("Initialize the input first! Enter your custom testcases here")
self.window.open_file(inputFile)
return
cmd = QuoteFunc(head + '/' + tail.split('.')[0])+"<"+QuoteFunc(head + '/' + inputFile)+">"+QuoteFunc(head + '/' + outputFile)
command = Command(cmd)
command.run(timeout = 3)
self.window.open_file(outputFile)
评论列表
文章目录