def interact(self): if self.distribution_reporter.get_done_files_count() == 0: raw_input('\n No files were processed...') return if raw_input('\n Want to show them on explorer? y/n: ') == 'y': opened_paths = [] for e in self.distribution_reporter.distributed: if not dirname(e.dest) in opened_paths: open_process(r'explorer /select,"' + e.dest + '"') opened_paths.append(dirname(e.dest))
def run_program(config, filepath): classpath = str(filepath).strip(filepath.name) classfile = filepath.name.strip(".java") cmd = 'java {}'.format(classfile) process = open_process(cmd, cwd=classpath, stdin=PIPE, stdout=PIPE, stderr=PIPE) st_output, st_error = process.communicate(bytes(config.input, 'UTF-8'), timeout = 30) code = process.returncode return (st_output, st_error, code)
def run_program(config, filepath): classpath = str(filepath).strip(filepath.name) classfile = filepath.name.strip(".java") cmd = 'java {}'.format(classfile) process = open_process(cmd, cwd=classpath, stdin=PIPE, stdout=PIPE, stderr=PIPE) st_output, st_error = process.communicate(bytes(config.input, 'UTF-8'), timeout=30) code = process.returncode return (st_output, st_error, code)
def compile_file(config, filepath): cmd = 'javac "{}"'.format(str(filepath)) process = open_process(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE) st_output, st_error = process.communicate(timeout=30) code = process.returncode return (st_output, st_error, code)
def compile_file(config, filepath): cmd = 'javac "{}"'.format(str(filepath)) process = open_process(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE) st_output, st_error = process.communicate(timeout = 30) code = process.returncode return (st_output, st_error, code)