Comments (6)
How are you creating the child process with subprocess
, and in particular did you ask for unicode rather than bytes in the stdin/stdout/stderr handles by using the (oddly named) universal_newlines=True
option?
[Update: You said wiki example but pointed at the tutorial, if the universal_newlines=True
trick works would you like to prepare an update to Doc/Tutorial.tex
adding it?]
We use this option in Bio.Applications
so that the everything is a (unicode) string rather than bytes. This seemed best for most of the command line tools we wrap (one exception is binary formats like SFF or BAM).
from biopython.
The universal_newlines
option did the trick. I probably would not have figured that out unless I reached the point of desperation, since the option name seems quite unrelated to the effect in this case.
Thanks.
from biopython.
I presume the thought process was that handling DOS/Windows vs Old Mac vs Unix newlines already required a handle wrapper, where file pointers via seek/tell are not transparent, and so that universal newlines code was co-opted during the bytes/unicode separation for Python 3. But is it a stupidly named argument :(
from biopython.
Tutorial example updated 522a693 - thanks for reporting this.
from biopython.
Sorry, I missed your edit about updating the tutorial. I would have been happy to update it!
from biopython.
With hindsight an extra comment would have been better than adding the note to the existing comment. Never mind.
from biopython.
Related Issues (20)
- two test failures affecting Bio.SeqIO.SeqXmlIO in Debian sid HOT 18
- Custom scoring function for aligner rather than a substitution matrix HOT 12
- Compile error on GCC 12 with Python3.11 HOT 4
- Incorrect element assignment for 4-character atom names.
- Phylogenetic Analysis
- Neighbor search based on residue HOT 1
- Recognize FTP files as MAF file when generating MafIO.MafIndex HOT 16
- big endian test failures s390x architecture HOT 12
- PDB.PDBIO.sav add end_ter = True HOT 13
- BiopythonDeprecationWarning in Bio.pairwise2 HOT 2
- bigbed test failures with Numpy 2.0.0b1 HOT 4
- Update doctests for numpy 2.0.0 scaler repr changes HOT 8
- [Inquiry to retrieve the SEQRES from PDB file] HOT 4
- No matching distrubtion found for biopython - error in the requirements.txt HOT 1
- bio/genbank/scanner.py issue when feature qualifier key wraps to the next line [SUGGESTION] HOT 3
- Entrez egquery example doctest breaking HOT 4
- Inefficient indexing into `Bio.Align.substitution_matrices.Array` during `pairwise2` alignment HOT 3
- Bio.Align.Alignment doesn't contain chromosome data? HOT 1
- BinaryCIF Parser HOT 2
- Calculating HSE with missing atoms on Gly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from biopython.