[BioPython] BLAST subprocess problem with a GUI

Peter biopython at maubp.freeserve.co.uk
Mon Feb 2 10:16:23 UTC 2009


On Mon, Feb 2, 2009 at 7:37 AM, Stefanie Lück <lueck at ipk-gatersleben.de> wrote:
>
> Hi Peter and the rest of the mailing list!
>
> I'm using Biopython 1.49b and Python 2.5.
>
> I tried your suggestion and changed \Blast\NCBIStandalone.py as you said:
>
>       import subprocess, sys
>       #We don't need to supply any piped input, but we setup the
>       #pipe anyway as a work around for a python bug if this is
>       #called from a Windows GUI program.  For details, see:
>       #http://bugs.python.org/issue1124861
>       blast_process = subprocess.Popen(cmd_string,
>                                        stdin=subprocess.PIPE,
>                                        stdout=subprocess.PIPE,
>                                        stderr=subprocess.PIPE,
>                                        shell=(sys.platform!="win32"))
>       blast_process.stdin.close()
>       return blast_process.stdout, blast_process.stderr
>
> And after comipilation with py2exe it's seem to work! In addition I changed
> \Application\__init__.py in function generic_run
> \ClustalW\__init__.py in function do_alignment
> in the same way because I got the same error message when I used Primer3
> and ClustalW. I tried up to now only on view Windows XP PC's but it's looks
> like the problem is solved!

Great - I've made this change in CVS now:
Blast/NCBIStandalone.py revision: 1.85
Clustalw/__init__.py revision 1.26
Application/__init__.py revision 1.9

> Finally I can release the tool for testing! Thanks to all for their help!
>
> Thanks a lot Peter and sorry for the late reply!
>
> Kind regards
> Stefanie

Thank you for reporting the issue, testing the change and letting us
know it works.

Peter




More information about the Biopython mailing list