Skip to content

Commit 19dac1d

Browse files
authored
Only Compile Python3 (#3)
* Base Python Code * Python Compiler * Update Dockerfile * Update Dockerfile * Python
1 parent ea00784 commit 19dac1d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

compiler/python.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ async function deleteFiles(pyPath, inputPath, exePath) {
3030
}
3131

3232
function getRunCommand(executable, input) {
33-
return `python ${executable} < ${input}`;
33+
34+
return `python3 ${executable} < ${input}`;
35+
36+
3437
}
3538

3639
function getExecutablePath(fileName) {
@@ -70,7 +73,8 @@ function runProgram(exePath, inputPath) {
7073
function runProgramNoIP(exePath) {
7174
return new Promise((resolve, reject) => {
7275

73-
exec(`python ${exePath}`, (error, stdout, stderr) => {
76+
exec(`python3 ${exePath}`, (error, stdout, stderr) => {
77+
7478
if (error) {
7579
reject({ error, stdout, stderr });
7680
} else {

0 commit comments

Comments
 (0)