[BioPython] blastall produces a black console screen with biopython 1.49 and up
Peter
biopython at maubp.freeserve.co.uk
Fri Apr 17 10:36:22 EDT 2009
On Fri, Apr 17, 2009 at 3:16 PM, Joaquin Abian Monux
<gatoygata at hotmail.com> wrote:
> Dear Peter,
>
> I already had seen that issue. I though it was not related with my problem
> because my program didn't hang (it had been also compiled with py2exe). The
> program works perfect. It runs the searches and shows the output, but each
> time I make a search I get the /Blast/bin/blastall.exe console popping. I
> have tried right now with 1.50b (I upgraded to 1.50b).
>
> Now, If I execute the main script from the system console (>python
> blast_main_205.pyw) the black screen does not appear when I send a Blast
> query. Neither If I execute from within the Stani's Python Editor IDE: it
> does not appear. It seems that this has been solved: before, with biopython
> 1.49 I was getting a console flash.
>
> But if I execute by double clicking on the main script, then it appears (!?)
>
> I compiled with py2exe (after fixing some problems in spark.py, see below)
> and the single file executable worked perfectly but I still get the nasty
> console when I make a blast query.
>
> So, still looking for help
>
> Joaquin
Right now I suggest you install Biopython 1.50 beta and then edit your
copy of Bio/Blast/NCBIStandalone.py to use os.popen3 instead of
subprocess. Then running py2exe and test it, and let us know if that
works.
If that works, we could revert to using os.popen3 on Python 2.5 or
older, and only use subprocess on Python 2.6+ (where os.popen3 is
deprecated), but that still leaves a possible problem on Python 2.6.
I think basically you have a platform specific corner use case, and we
may not be able to get Bio/Blast/NCBIStandalone.py to cope without a
lot of effort (fixes welcome). You could also try using subprocess
but modify the shell argument, but I think that will break other
situations.
We've been discussing our command line application wrappers on the dev
mailing list this month, and after Biopython 1.50 I plan to update
Bio.Blast.Applications (and make Bio.Blast.NCBIStandalone use this
internally). The (slightly out of date) wrappers in
Bio.Blast.Applications just take care of building the command line
string - you would then be able to invoke it as you see fit (e.g.
using os.system, os.popen3, subprocess - or even submit the task to
your local computing cluster). The idea is that
Bio.Blast.NCBIStandalone would continue to be a general purpose
solution suitable for most situations (but perhaps not Windows GUI
programs using py2exe), while Bio.Blast.Applications would give you a
lower level option with more control.
Peter
More information about the Biopython
mailing list