[Biopython-dev] [Bug 2480] Local BLAST fails: Spaces in Windows file-path values

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Mon Sep 29 11:30:15 UTC 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2480





------- Comment #23 from biopython-bugzilla at maubp.freeserve.co.uk  2008-09-29 07:30 EST -------
Just to confirm: Dealing with spaces in filenames on Windows is horrible, isn't
it?

There appear to be problems with os.popen3 with a quoted executable name with
spaces when there are additional arguments (and for BLAST calls there will
always be extra arguments).  Switching from os.popen3 to the subprocess module
(python 2.4+ only) might help, but spaces are still tricky here.

I think the best solution is to get rid of the spaces on Windows.  In your case
you can't move BLAST, but you can call it via the DOS 8.3 style alternative
filename (which won't have any spaces).  You'll have to install Mark Hammond's
win32 extensions from https://sourceforge.net/projects/pywin32/ to do this,
using the win32api.GetShortPathName() function.

Right now I suggest you try this in your own code before calling
Bio.Blast.NCBIStandalone.blastall() to "fix" the exe name, and if needed the
database and input filenames too.  Assuming this works nicely, we can put a
note in the documentation.


-- 
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