Commit 69888527 authored by Mikaël Salson's avatar Mikaël Salson
Browse files Use os.system instead of Popen

For some reason, Popen complained about a No such file or directory''.
Moreover Popen is not necessary as we don't care about STDOUT or STDERR
parent c722ca67
......@@ -3,7 +3,6 @@ from contextlib import contextmanager
import tempfile
import shutil
import defs
from subprocess import Popen, PIPE, STDOUT, os
import gluon
if request.env.http_origin:
......@@ -51,7 +50,6 @@ def segment_sequences(sequences):
#store result in a tmp file
result_path = folder_path + "/sequences.vidjil"
result = open(result_path, 'w')
## les chemins d'acces a vidjil / aux fichiers de sequences
germline_folder = defs.DIR_VIDJIL + '/germline/'
......@@ -65,11 +63,8 @@ def segment_sequences(sequences):
cmd += ' ' + config + ' ' + file_path
## execute la commande vidjil
p = Popen(cmd, shell=True, stdin=PIPE, stdout=result, stderr=STDOUT, close_fds=True)
with open(result_path, 'r') as myfile:
text_result =
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment