[Biopython-dev] Martel-0.3 available

Brad Chapman chapmanb at arches.uga.edu
Thu Oct 12 20:38:05 EDT 2000


Andrew wrote:
[my worries about different types of line breaks]
>  There might be a problem with interoperability between difference
>  OSes.
>  That could be addressed in one of several ways:
>    1) require the input to be converted to the local line ending and
>  provide no support for doing so
>    2) supply some adapters ("FromMac", "FromUnix", "FromDos") but don't
>  use them; instead leaving the decision up to the client code
>    3) provide a tool which autodetects endings and uses the right
>  adapter
>    4) http://members.nbci.com/_XOOM/meowing/python/index.html
>    5) define an	EOL = Re(r"\n|\r\n?")
>  
>  I prefer 2-4, but would like to stick with 1 for now.  I don't like 5
>  because people will forget to use it.

Hmmm, I don't know, I think I like 5 best of all of these options. There
is definately the problem of people forgetting, as you mention, but it
does have a number of bonuses:

1. Easy to implement, and isn't very likely to break :-).

2. Provided the regexp would recognize Mac line breaks (hmmm, I'm not
positive what those look like) then this could deal with files with
multiple different types of line breaks without whining. There are times
where people have generated files like this in my lab (the sequencer is
running Windows, but they like to play around on the files on a Mac -- I
still don't know how they got a mix of line breaks -- I think by cutting
and pasting between files with different line breaks). Anyways, the point
is that the regexp can deal with "worst case" scenarios, whereas the
other options can bomb out.

Anyways, that is why I am for 5, especially as a short-term solution over
1. 

Brad




More information about the Biopython-dev mailing list