diff options
author | Jayaram R Pai | 2014-09-17 17:00:26 +0530 |
---|---|---|
committer | Jayaram R Pai | 2014-09-17 17:00:26 +0530 |
commit | 83f86d8caef9e4f9713867d5917c20df59d41581 (patch) | |
tree | 442e3d88af4b3fee14898b9969d7590063392c56 /website/helpers.py | |
parent | a67da00579d04518032deb968493bad26b0a3bf3 (diff) | |
download | scilab-on-cloud-83f86d8caef9e4f9713867d5917c20df59d41581.tar.gz scilab-on-cloud-83f86d8caef9e4f9713867d5917c20df59d41581.tar.bz2 scilab-on-cloud-83f86d8caef9e4f9713867d5917c20df59d41581.zip |
generalised settings.py, option for scilab flags
Diffstat (limited to 'website/helpers.py')
-rw-r--r-- | website/helpers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/website/helpers.py b/website/helpers.py index b3894ba..aa20c5b 100644 --- a/website/helpers.py +++ b/website/helpers.py @@ -2,7 +2,7 @@ import os, re, sys, time, subprocess from soc.settings import PROJECT_DIR from timeout import TimerTask -from soc.config import SCILAB_BIN, SCIMAX_LOADER, UPLOADS_PATH +from soc.config import SCILAB_BIN, SCILAB_FLAGS, SCIMAX_LOADER, UPLOADS_PATH def scilab_run(code, token, book_id, dependency_exists): #Check for system commands @@ -52,7 +52,7 @@ def scilab_run(code, token, book_id, dependency_exists): #this makes it possible to execute scilab without the problem of \ #getting stuck in the prompt in case of error cmd = 'printf "exec(\'{0}\',2);\nquit();"'.format(file_path) - cmd += ' | {0} -nw'.format(SCILAB_BIN) + cmd += ' | {0} {1}'.format(SCILAB_BIN, SCILAB_FLAGS) task = TimerTask(cmd, timeout=15) output = task.run().communicate()[0] |