-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MuscleCommandline example using stdin and stdout broken on Python 3 #284
Comments
How are you creating the child process with [Update: You said wiki example but pointed at the tutorial, if the We use this option in |
The Thanks. |
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 :( |
Tutorial example updated 522a693 - thanks for reporting this. |
Sorry, I missed your edit about updating the tutorial. I would have been happy to update it! |
With hindsight an extra comment would have been better than adding the note to the existing comment. Never mind. |
Following the wiki example for using the MUSCLE commandline interface under Python 3 fails at the stage in which you write the SeqRecords to the child process's stdin. In Python 3, string data cannot be written to this buffer; only bytes can:
However, trying to get around this by writing encoded bytes to a Seq object (understandably) fails:
I'm not sure whether this should be fixed in Biopython or the example should be removed or updated in the Wiki (I haven't yet found a workaround, other than just skipping keeping everything in memory and using intermediate files).
The text was updated successfully, but these errors were encountered: