[Biopython-dev] [Bug 2528] New: NCBIStandalone.blastall(): Replace os.popen3 with subprocess.Popen
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Mon Jun 23 10:54:22 UTC 2008
http://bugzilla.open-bio.org/show_bug.cgi?id=2528
Summary: NCBIStandalone.blastall(): Replace os.popen3 with
subprocess.Popen
Product: Biopython
Version: 1.45
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Main Distribution
AssignedTo: biopython-dev at biopython.org
ReportedBy: mmokrejs at ribosome.natur.cuni.cz
I have already mentioned this on the email list few weeks ago ... NCBI Blast
2.2.18 (but was a case of also previous version as far as I remember) does not
flush output buffers when run from under mod_python-3.3.11/apache-2.2.8.
I tried to flush the buffers or disable buffering but it does not help. In the
end, a working solution is to move the using subprocess module introduced in
python 2.4 and which deprecates os.system, os.exec, os.popen* and other
functions. The following patch works for me, so the user receives back into
his/her web browser the blast stdout. Somehow, one has to copy the data into
another variable and close the file descriptors used by blastall binary.
Unfortunately, still a stale process can be seen in "ps -ef" output:
apache 5382 5323 47 12:31 ? 00:00:04 [blastall] <defunct>
But as I have said, at least the data is not buffered anymore.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list