[Biopython] [BioPython]blastall produces a black console screen with biopython 1.49 and up‏

Joaquin Abian Monux gatoygata at hotmail.com
Tue Apr 21 17:15:21 UTC 2009


Hi Stefanie,

It is a normal, minimal setup.py for windows and single file executables:

# exWx/setup.py
from distutils.core import setup
import py2exe

setup(
    windows=[
            {'script': "blast_main_205.pyw",
             'icon_resources':[(0,'blast.ico')]
            }
            ],
            
    options={
            'py2exe': {
                        #'packages' :    [],
                        #'includes':     [],
                        'excludes':     [
                                         'Tkconstants','Tkinter', 'tcl'
                                        ],
                        'ignores':       ['wxmsw26uh_vc.dll'],
                        'dll_excludes': ['libgdk_pixbuf-2.0-0.dll',
                                         'libgdk-win32-2.0-0.dll',
                                         'libgobject-2.0-0.dll'
                                        ],
                        'compressed': 1,
                        'optimize':2,
                        'bundle_files': 1
                        }
            },
    zipfile = None,
    data_files= [
                ]
    )


I
think I understand the logic of your question. I will try with
'console' and let you know what happens. Here at work I have 1.48
installed and 1.50 at home.

Currently, with biopython 1.50, I can produce py2exe single file executables of GUI programs based on wxpython that work perfectly after:

a)
I set console=True in the subprocess call in _invoke_blast
(NCBIStandalone.py). Otherwise I have the Blast.exe console popping
when I make a search.

b) I modify a line in the addRule function
in spark.py: rules = doc.split() ---to-->  rules = doc.split() if doc
else []. Otherwise the executable is produced but gives an exception
when ran saying that can not split 'None'.

Best regards

Joaquin  





> From: lueck at ipk-gatersleben.de
> To: biopython at maubp.freeserve.co.uk; gatoygata at hotmail.com; biopython at lists.open-bio.org
> Subject: Re: [BioPython]blastall produces a black console screen with biopython 1.49 and up‏
> Date: Mon, 20 Apr 2009 13:07:20 +0200
> 
> Hi!
> 
> How does your py2exe setup.py file looks?
> 
> from distutils.core import setup
> import py2exe
> 
> #python setup.py py2exe
> 
> setup(
>     windows = [
>         {
>             "script": "nb_psst.py",                    ### Main Python 
> script
>             "icon_resources": [(0, "Icon.ico")]     ### Icon to embed into 
> the PE file.
>         }
>     ],
> )
> 
> If you use console instead of windows in setup() will the black screen 
> dissapear?
> 
> Kind regards
> Stefanie
> 
> 
> ----- Original Message ----- 
> From: "Peter" <biopython at maubp.freeserve.co.uk>
> To: "Joaquin Abian Monux" <gatoygata at hotmail.com>; "BioPython Mailing List" 
> <biopython at lists.open-bio.org>
> Sent: Friday, April 17, 2009 5:38 PM
> Subject: Re: [BioPython]blastall produces a black console screen with 
> biopython 1.49 and up‏
> 
> 
> On Fri, Apr 17, 2009 at 4:24 PM, Joaquin Abian Monux
> <gatoygata at hotmail.com> wrote:
> > Dear Peter,
> >
> > Thanks, I fixed it. I'm not sure how.
> >
> > In:
> >
> > blast_process = subprocess.Popen(cmd_string,
> > stdout=subprocess.PIPE,
> > stderr=subprocess.PIPE,
> > stdin=subprocess.PIPE,
> > shell= (sys.platform!="win32"))
> >
> > (sys.platform!="win32") is False for my winXP computer. But if I set the
> > parameter shell=True, then the problem disappears, either in the py2exe
> > executables and in the scripts. Everything works perfect as usual.
> >
> > if shell=True in windows the shell used is the one set in COMSPEC. In my
> > case it is the normal windows shell (cmd.exe). If shell=False I am not 
> > sure
> > what happens in windows. Obviously no cmd shell should be 
> > expected...still,
> > blast.exe opens his.
> > ...
> > Done! (Although it would be nice someone could explain why the 'shell'
> > parameter must be 'True' for the program to behave properly)...
> 
> >From memory, with subprocess using the shell argument in this way was
> deliberate on to get things to work cross platform.  I looks like when
> running from the command line you need the *opposite* shell setting to
> running from py2exe.
> 
> Could you put together a trivial python GUI application that calls
> BLAST that we could use for testing?
> 
> Peter
> 
> _______________________________________________
> Biopython mailing list  -  Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
> 

_________________________________________________________________
Más rápido, sencillo y seguro. Descárgate ya el nuevo Internet Explorer 8 ¡Es gratis!
http://www.vivelive.com/ie8 




More information about the Biopython mailing list