[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
Sun Sep 28 20:57:20 EDT 2008
http://bugzilla.open-bio.org/show_bug.cgi?id=2480
------- Comment #21 from drpatnaik at yahoo.com 2008-09-28 20:57 EST -------
I have tried the latest 'NCBIStandalone.py' file, from CVS (version 1.77). The
variable values are as mentioned in comment #16.
I no longer get the error from 'os.path.exists'. However, I still get the
'C:/Documents' is not recognized...' error in the error file.
By adding a print command to the 'NCBIStandalone.py' file, I can see that the
system command being initiated by Python is:
"C:/Documents and Settings/patnaik/My Documents/blast/bin/blastall.exe" -p
blastn -d "\"C:\Documents and Settings\patnaik\My
Documents\blast\bin\hairpin.fa.db\"" -i "C:\Documents and Settings\patnaik\My
Documents\blast\bin\30a.seq" -m 7
This command works as such if run outside Python. If I put it directly inside
the 'os.popen3' call in the 'NCBIStandalone.py' file, I still get the
'C:/Documents' is not recognized...'. Same happens if I run a Python file with
this code:
import os
my_cmd = r'"C:/Documents and Settings/patnaik/My
Documents/blast/bin/blastall.exe" -p blastn -d "\"C:\Documents and
Settings\patnaik\My Documents\blast\bin\hairpin.fa.db\"" -i "C:\Documents and
Settings\patnaik\My Documents\blast\bin\30a.seq" -m 7'
w, r, e = os.popen3(my_cmd)
print e.read()
It seems that using the 'subprocess' module is the only way around this.
--
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